阅读:24083回复:0
Chrome浏览器中Checkbox半选样式修改
在不改平台底层的情况下,改变平台checkbox半选状态的样式
<html> <head> <meta charset="utf-8" /> <style type="text/css"> input[type=checkbox]:indeterminate:before{ content: "-"; font-size: 18pt; text-align: center; line-height: 8px; color: #2A93BE; background: #2A93BE; float: left; position: relative; top: 2px; left:2px; } </style> </head> <body> <input type="checkbox" value="1" id="checkbox1" /> <input type="button" onclick="document.getElementById('checkbox1').indeterminate=true" value="半选"> </body> </html> 效果如下: |
|