Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xcode/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular material 将文本转换:无和字体重量:粗体样式添加到<;md按钮>;在无内联css的角度材质设计中_Angular Material - Fatal编程技术网

Angular material 将文本转换:无和字体重量:粗体样式添加到<;md按钮>;在无内联css的角度材质设计中

Angular material 将文本转换:无和字体重量:粗体样式添加到<;md按钮>;在无内联css的角度材质设计中,angular-material,Angular Material,我正在从事一个使用角材质设计的项目,我想在不使用内联css的情况下添加某些样式,但无法找到最好的方法 请注意,我试图添加一个具有这些样式的类,但默认情况下,它是从.md button类中拾取样式,而不是拾取我添加的Css类 CSS类 .button__style { text-transform :none; font-weight :bold; } HTML 你的HTML <div class='button__style'> <md-button >Cli

我正在从事一个使用角材质设计的项目,我想在不使用内联css的情况下添加某些样式,但无法找到最好的方法

请注意,我试图添加一个具有这些样式的类,但默认情况下,它是从.md button类中拾取样式,而不是拾取我添加的Css类

CSS类

.button__style {
  text-transform :none;
  font-weight :bold;
 }
HTML

你的HTML

<div class='button__style'>
<md-button >Click me </md-button>
</div>
试试这个


谢谢这有帮助,但我想知道我们是否可以像处理颜色一样处理主题。我不确定如何使用主题处理。如果有人知道答案,那就太好了。
angular.module('myApp', ['ngMaterial'])
 .config(function($mdThemingProvider) {
  $mdThemingProvider.theme('default')
   .primaryPalette('pink')
   .accentPalette('orange');
});
<div class='button__style'>
<md-button >Click me </md-button>
</div>
.button__style {
    button {
        text-transform: none;
        font-weight :bold;
//or any style you want to apply
        }
}