CSS3中伪类改造CHECKBOX样式
收藏个看到的技巧,在CSS3中,可以比如做到,原来CHECKBOX的是方的,变为圆形的;方法是使用伪类:
//html <input type="checkbox" class="check"> //css .check { background-color: #8BC34A; width: 40px; -webkit-appearance: none; appearance: none; } .check::after { content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="-10 -18 100 135"><circle cx="50" cy="50" r="50" fill="none" stroke="#fff" stroke-width="3"/></svg>'); }
相关推荐
nicepainkiller 2020-05-05
资源分享 2020-01-21
81463166 2020-01-04
CaiKanXP 2019-12-18
风飞飘扬 2014-06-24
88580793 2018-01-03
攻城师 2019-06-29
有心就有方向 2018-01-03
jianqi 2019-06-27
云端漂移 2019-06-27
yezi 2019-06-26
luyou0 2013-12-24
昔人已老 2013-11-30
Haoroid 2013-05-23
momode 2013-04-29
半纸药笺 2019-06-20
屋顶小黑猫 2013-03-21
ruizhenggang 2012-03-31
hepandefeng 2018-08-15