这次给大家带来html的checkbox和radio怎样美化样式,html的checkbox和radio美化样式的注意事项有哪些,下面就是实战案例,一起来看一下。
HTML的checkbox和radio样式美化的简单实例
checkbox:
input[type="checkbox"] { display: none; } input[type="checkbox"] + label { display: inline-block; position: relative; border: solid 2px #99a1a7; width: 35px; height: 35px; line-height: 35px; border-radius: 4px; } input[type="checkbox"]:checked + label:after { content: '\2714'; font-size: 25px; color: #99a1a7; width: 35px; height: 35px; line-height: 35px; position: absolute; text-align: center; background-color: #e9ecee; } .tab { margin-top: 20px; margin-bottom: 20px; width: 100%; } .tab td { border: solid 1px #f99; font-size: 25px; line-height: 39px; }
登录后复制 测试101 测试102 测试 测试103 测试104 测试 测试 测试201 测试202 radio:XML/HTML Code复制内容到剪贴板 input[type=”radio”] { display: none; } input[type=”radio”] + label { display: inline-block; position: relative; border: solid 2px #99a1a7; width: 25px; height: 25px; line-height: 25px; padding: 5px; border-radius: 19.5px; } input[type=”radio”]:checked + label:after { content: ‘ ‘; font-size: 25px; color: #99a1a7; width: 25px; height: 25px; line-height: 25px; position: absolute; text-align: center; background-color: #99a1a7; border-radius: 12.5px; } input[type=”radio”]:checked + label { background-color: #e9ecee; } .tab { margin-top: 20px; margin-bottom: 20px; width: 100%; } .tab td { border: solid 1px #f99; font-size: 25px; line-height: 39px; } 测试101 测试102 测试 测试103 测试104 测试 测试 测试201 测试202
相信看了这些案例你已经掌握了方法,更多精彩请关注【创想鸟】其它相关文章!
相关阅读:
立即学习“前端免费学习笔记(深入)”;
注意事项
注意事项
注意事项
以上就是HTML的checkbox和radio怎样美化样式的详细内容,更多请关注【创想鸟】其它相关文章!
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至253000106@qq.com举报,一经查实,本站将立刻删除。
发布者:PHP中文网,转转请注明出处:https://www.chuangxiangniao.com/p/3194371.html