问题:
如何更改 UIkit 图标的颜色?具体来说,我想更改复选框图标的背景颜色。
这是 UIkit Form documentation 的链接.
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.40/css/uikit.min.css" />
<input style="color:red" class="uk-checkbox" type="checkbox">
我想改变背景的颜色。
最佳答案
input.uk-checkbox {
background-color: red;
}
input.uk-checkbox:checked {
background-color: red;
}
input.uk-checkbox:checked:focus {
background-color: red;
}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.40/css/uikit.min.css" />
<input class="uk-checkbox" type="checkbox">
Because the UIkit applies styling using their framework you wil have to overwrite.
所以他们使用.uk-checkbox {background-color: red;}
,就像上面的输入一样,input.uk-checkbox {background-color: red;}
。
关于html - 更改 UIkit 复选框的背景颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49208169/