最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
当前位置: 首页 - 科技 - 知识百科 - 正文

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

来源:动视网 责编:小采 时间:2020-11-27 15:28:13
文档

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

html中单选框样式自定义的示例:html中单选框样式自定义的示例:<!DOCTYPE html> <html lang="en"> <head> <!--单选框样式--> <meta charset="UTF-8"> <title>Title</title
推荐度:
导读html中单选框样式自定义的示例:html中单选框样式自定义的示例:<!DOCTYPE html> <html lang="en"> <head> <!--单选框样式--> <meta charset="UTF-8"> <title>Title</title


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中单选框样式自定义的示例

html中单选框样式自定义的示例:html中单选框样式自定义的示例:<!DOCTYPE html> <html lang="en"> <head> <!--单选框样式--> <meta charset="UTF-8"> <title>Title</title
推荐度:
标签: 自定义 样式 html
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题
Top