您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息
三六零分类信息网 > 通辽分类信息网,免费分类信息发布

使用css样式制作单选框

2025/8/16 21:14:57发布8次查看
我们直接来看一下具体的实现代码:
(如果您想学习css,那么这里向您推荐css视频教程)
<!doctype html><html><head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>document</title> <link rel="stylesheet" href="./reset.css"> <style> .radio-diy .radiocircle { width: 12px; height: 12px; border: 1px solid #999; border-radius: 50%; cursor: pointer; display: inline-block; } .radio-diy input:checked+span { border: 1px solid#008c8c; } .radio-diy input:checked~span { color: #008c8c; } .radio-diy input:checked+span.radiocircle::after { content: ""; display: block; width: 6px; height: 6px; background: #008c8c; border-radius: 50%; cursor: pointer; margin-left: 3px; margin-top: 3px; } input[type="radio"] { display: none; } </style></head><body> 请选择性别: <label> <input type="radio" name="gender" value="male"> <span></span> <span>男</span> </label> <label> <input type="radio" name="gender" value="female"> <span></span> <span>女</span> </label></body></html>radio.css
效果展示:
推荐教程:css快速入门
以上就是使用css样式制作单选框的详细内容。
通辽分类信息网,免费分类信息发布

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product