在CSS中设置HTML按钮的样式
我在HTML表单中有两个按钮,定义为在CSS中设置HTML按钮的样式,html,css,typescript,Html,Css,Typescript,我在HTML表单中有两个按钮,定义为 <button kmdPrimaryButton size="mini" (click)="clickSection('table')">Table View</button> <button kmdPrimaryButton size="mini" (click)="clickSection('chart')">Chart View<
<button kmdPrimaryButton size="mini" (click)="clickSection('table')">Table View</button>
<button kmdPrimaryButton size="mini" (click)="clickSection('chart')">Chart View</button>
还有.按钮,但两者都不起作用。有什么不同的方法来调整上述按钮吗?
编辑1
这就是我在ts文件中链接文件的方式
@Component({
selector: 'app-control-validation',
templateUrl: './controlval.component.html',
styleUrls: ['./controlval.component.css']
})
文件名为controlval.component.ts.请尝试以以下方式将CSS文件直接添加到HTML文件头中:
<link rel="stylesheet" href="yourCSSfilepath"/>
对于按钮的样式请尝试以以下方式将CSS文件直接添加到HTML文件头中:
<link rel="stylesheet" href="yourCSSfilepath"/>
对于按钮的样式,只需添加
!重要信息
如下所示:
button {
margin:8px !important;
color:#ED7700 !important;
}
它将取代您的css按钮。只需添加
!重要信息
如下所示:
button {
margin:8px !important;
color:#ED7700 !important;
}
它将替换您的css按钮。请添加有关如何链接html和css文件的代码together@tommueller添加为编辑。请添加有关如何链接html和css文件的代码together@tommueller添加为编辑。