css3实现单选

<!DOCTYPE html>
<html>
    <head>
        <Meta charset="UTF-8">
        <title></title>
        <style>
            input{
                display: none;
            }
            label:before{
                content: ‘‘;
                display: inline-block;
                width: 3px;
                height: 3px;
                border: 1px solid red;
                border-radius: 50%;
                padding: 2px;
            }
            input:checked+label:before{
                background: red;
                background-clip: content-Box;
            }
        </style>
    </head>
    <body>
        <input id="man" type="radio" name="gender" checked/>
        <label for="man"></label>
        <input id="woman" type="radio" name="gender" />
        <label for="woman"></label>
    </body>
</html>

相关文章

Css3如何实现鼠标移上变长特效?(图文+视频)
css3怎么实现鼠标悬停图片时缓慢变大效果?(图文+视频)
jquery如何实现点击网页回到顶部效果?(图文+视频)
css3边框阴影效果怎么做?(图文+视频)
css怎么实现圆角边框和圆形效果?(图文+视频教程)
Css3如何实现旋转移动动画特效