gpt4 book ai didi

html - 在 Materialise 框架中更改复选框的颜色

转载 作者:太空狗 更新时间:2023-10-29 14:42:59 24 4
gpt4 key购买 nike

我目前正在使用 Materialize 框架,想知道是否可以更改已填充复选框的颜色,因为它默认为绿色。

<input type="checkbox" class="filled-in" id="filled-in-box" checked="checked" />
<label for="filled-in-box">Filled in</label>

如有任何想法,我们将不胜感激。谢谢

最佳答案

将一个类添加到复选框输入,它将为标签的后伪元素设置样式

.checkbox-orange[type="checkbox"].filled-in:checked + label:after{
border: 2px solid #ff9800;
background-color: #ff9800;
}
<input type="checkbox" class="filled-in checkbox-orange" id="filled-in-box" checked="checked" />
<label for="filled-in-box"></label>

关于html - 在 Materialise 框架中更改复选框的颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35261021/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com