Angular 材质不会将样式应用到组件
Angular Materials won't apply styles to components
这是一个简单的片段:
.profilebutton {
float: right;
}
<!-- PROFILE BUTTON -->
<div class="col-md-4 profilebuttoncontainer">
<button md-button [routerLink]="'/welcome/profile'" class="profilebutton">Profile</button>
</div>
我到底做错了什么?我一直在尝试从 Angular 材料中设置工具栏、对话框、复选框的样式,但其中 none 适用。我可以使用检查器在 mat-(无论什么)下更改样式,例如 mat-button、mat-dialog-container,这很有效,但我如何将其转换为 css?看来我无权修改垫子-(stuff)
我只想在容器的右侧粘贴一个 md 按钮。超级简单。
您的代码应按预期工作。看下面的代码,
<div class="profilebuttoncontainer">
<button md-button class="temp-class">Click me!</button>
</div>
注意:使用以下行在组件级别添加样式表引用
styleUrls:[`....`]
这是一个简单的片段:
.profilebutton {
float: right;
}
<!-- PROFILE BUTTON -->
<div class="col-md-4 profilebuttoncontainer">
<button md-button [routerLink]="'/welcome/profile'" class="profilebutton">Profile</button>
</div>
我到底做错了什么?我一直在尝试从 Angular 材料中设置工具栏、对话框、复选框的样式,但其中 none 适用。我可以使用检查器在 mat-(无论什么)下更改样式,例如 mat-button、mat-dialog-container,这很有效,但我如何将其转换为 css?看来我无权修改垫子-(stuff)
我只想在容器的右侧粘贴一个 md 按钮。超级简单。
您的代码应按预期工作。看下面的代码,
<div class="profilebuttoncontainer">
<button md-button class="temp-class">Click me!</button>
</div>
注意:使用以下行在组件级别添加样式表引用
styleUrls:[`....`]