html中单选框样式自定义的示例

html中单选框样式自定义示例

            Title            .choice{            position: relative;        }        .choice .radio{            position: relative;            display: inline-block;            font-weight: 400;            color: #0c4757;            padding-left: 25px;            cursor: pointer;        }        .choice .radio input{            position: absolute;            left: -9999px;        }        .choice .radio i{            display: block;            position: absolute;            top: 6px;            left: 0;            width: 15px;            height: 15px;            outline: 0;            border: 1px solid #666;            border-radius: 50%;            transition: border-color .3s;            -webkit-transition: border-color .3s;        }        .choice .radio input:checked+i{            border-color: #0c4757;        }        .choice .radio input+i:after{            position: absolute;            content: '';            top: 0;            left: 0;            width: 100%;            height: 100%;            border-radius: 50%;            background-color: red;            opacity: 0;            transition: opacity .1s;            -webkit-transition: opacity .1s;        }        .choice .radio input:checked+i:after{            opacity: 1;        }    

以上就是html中单选框样式自定义的示例的详细内容,更多请关注创想鸟其它相关文章!

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 chuangxiangniao@163.com 举报,一经查实,本站将立刻删除。
发布者:程序猿,转转请注明出处:https://www.chuangxiangniao.com/p/1545093.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2025年12月21日 16:33:05
下一篇 2025年12月21日 16:33:24

相关推荐

发表回复

登录后才能评论
关注微信