html中单选框样式自定义的示例
html
示例
自定义
html中单选框样式自定义的示例:
<!DOCTYPE html> <html lang="en"> <head> <!--单选框样式--> <meta charset="UTF-8"> <title>Title</title> <style type="text/css"> .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; } </style> </head> <body> <p class="choice"> <label class="radio">在校生<input type="radio" name="radio" value="1" checked><i></i></label> <label class="radio">非在校生<input type="radio" value="2" name="radio"><i></i></label> </p> </body> </html>
登录后复制
以上是html中单选框样式自定义的示例的详细内容。更多信息请关注PHP中文网其他相关文章!
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn

热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

AI Hentai Generator
免费生成ai无尽的。

热门文章
R.E.P.O.能量晶体解释及其做什么(黄色晶体)
4 周前
By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O.最佳图形设置
4 周前
By 尊渡假赌尊渡假赌尊渡假赌
刺客信条阴影:贝壳谜语解决方案
2 周前
By DDD
R.E.P.O.如果您听不到任何人,如何修复音频
4 周前
By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25:如何解锁Myrise中的所有内容
1 个月前
By 尊渡假赌尊渡假赌尊渡假赌

热工具

记事本++7.3.1
好用且免费的代码编辑器

SublimeText3汉化版
中文版,非常好用

禅工作室 13.0.1
功能强大的PHP集成开发环境

Dreamweaver CS6
视觉化网页开发工具

SublimeText3 Mac版
神级代码编辑软件(SublimeText3)
