我的网站上有一个自定义复选框,选中后会显示fontawesome
刻度。这适用于Firefox,但在其他浏览器上点击它时没有显示任何内容。在边缘,它看起来有点灰色方块,但不是整个刻度。
请在下方找到我自定义的CSS复选框:
.newsletter input[type="checkbox"]:checked::after {
content: "\f00c";
color: #fff;
position: absolute;
left: 50%;
top: 50%;
-webkit-transform: translate(-50%,-50%);
-moz-transform: translate(-50%,-50%);
-ms-transform: translate(-50%,-50%);
transform: translate(-50%,-50%);
}
.newsletter input[type="checkbox"] {
padding: 7px 7px !important;
height: 10px !important;
width: 10px !important;
display: inline-block !important;
border: 1px #000 solid;
background-color: #fff;
}
input[type="checkbox"] {
padding: 2px;
border: 4px solid #fff;
border-radius: 100%;
width: 20px;
height: 20px;
background-origin: content-box;
box-shadow: 0 0 0 1px #999;
-webkit-appearance: none;
border-radius: 0;
}
input:checked {
background-color: #3795f8;
}
input {
-webkit-appearance: none;
appearance: none;
-webkit-border-radius: 0;
border-radius: 0;
border: 1px solid #ddd;
padding: 10px 5px;
font-size: 1em;
display: block;
width: 100%;
margin-top: 5px;
}
input, select {
vertical-align: middle;
-webkit-border-radius: 0;
border-radius: 0;
padding: 0;
margin: 0;
margin-top: 0px;
}
有人可以告诉我如何解决我的问题吗?