我试图用以下unicode字符替换未选中的复选框:☐或◻
我尝试通过使复选框的content属性成为unicode字符来做到这一点,但这似乎不起作用.
以下是我尝试执行上述操作的CSS样式:
.question input[type='checkbox']{
background:none;
content:?;
cursor:pointer;
}
Run Code Online (Sandbox Code Playgroud)
如何替换复选框或隐藏它,并在其位置有一个unicode字符?
这是一个JSFiddle我试图这样做:http://jsfiddle.net/mNsAv/
Mar*_*Zab 10
示例:之前
.question input[type='checkbox'] + label:before {
content:"?";
}
.question input[type='checkbox']:checked + label:before {
content:"?";
}
.question input[type='checkbox'] {
display:none;
}
Run Code Online (Sandbox Code Playgroud)