【发布时间】:2020-11-13 04:20:57
【问题描述】:
我正在使用我在 this answer 上找到的样式设置复选框的样式
.checkbox{
width: 25px;
height: 25px;
background: map-get($map: $gray, $key: 2);
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
border-color: map-get($map: $gray, $key: 3);
position: relative;
left: -5px;
top: -5px;
cursor: pointer;
}
虽然使用这种样式,当我选择一个框时,不会出现复选标记。我还想要一个与默认边框颜色不同的非常细的边框。
我还想移除当复选框被聚焦时出现的这个轮廓
我正在尝试让复选框看起来像这样
添加以下样式没有帮助
.checkbox:focus{
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
注意:阴影来自另一个类
【问题讨论】: