laber美化表单小技巧
来源:互联网 发布:62数据脚本源码 编辑:程序博客网 时间:2024/05/01 16:29
<!DOCTYPE html><html><head lang="en"> <meta charset="UTF-8"> <title></title></head><style> .drag ul li, .dragg ul li { width: 100%; height: 60px; list-style-type: none; } .drag ul li label, .dragg ul li label { width: 30px; height: 30px; display: inline-flex; background: #f2f2f2; border: 1px solid #d8d8d8; border-radius: 4px; } .drag ul li input[type="checkbox"], .dragg ul li input[type="checkbox"] { display: none; } .drag ul li input[type="checkbox"] + b, .dragg ul li input[type="checkbox"] + label b { display: inline-block; width: 30px; height: 30px; vertical-align: middle; cursor: pointer; } .drag ul li input[type="checkbox"]:checked + b, .dragg ul li input[type="checkbox"]:checked + label b { background: url("../images/check_icon.png") no-repeat center center; background-size: 96% auto; } .testContent { width: 100%; clear: both; height: 200px; box-sizing: border-box; } .testContent ul { margin: 0 auto; padding: 0; width: 80%; } .testContent ul:nth-child(1) { display: block; } .testContent ul:nth-child(2) { display: none; } .testContent ul:nth-child(3) { display: none; } .testContent ul li { font-size: 0.95em; width: 100%; height: 33px; list-style-type: none; box-sizing: border-box; padding-left: 10px; } .testContent ul li b { width: 15px; height: 15px; border: 1px solid #f95f05; display: list-item; border-radius: 10px; float: left; text-align: center; } .testContent ul li span { float: left; box-sizing: border-box; padding-left: 10px; margin-top: -1px; } .testContent ul li b input { outline: none; width: 11px; height: 11px; overflow: hidden; border-radius: 10px; margin-bottom: 2px; } .option-input { -webkit-appearance: none; border: none; } .option-input:checked { background: #f95f05; }</style><body><div class="drag"> <!--隐式运用实现多个复选框,主要在选项多时--> <form> <ul> <li><label><input type="checkbox" checked="true"><b></b></label></li> <li><label><input type="checkbox"><b></b></label></li> <li><label><input type="checkbox"><b></b></label></li> <li><label><input type="checkbox" checked="true"><b></b></label></li> </ul> </form></div><div class="dragg"> <!--运用laber for实现复选样式美化 这一定要绑定id和for--> <form> <ul> <li> <input type="checkbox" id="check" checked="true"> <label for="check"><b></b></label> </li> </ul> </form></div><!--运用laber 实现radio--><div class="testContent"> <form> <ul> <li><label><b><input name="age" type="radio" class="option-input" value="A"></b><span>30岁以下</span></label> </li> <li><label><b><input name="age" type="radio" class="option-input" value="B"></b><span>30-50岁</span></label> </li> <li><label><b><input name="age" type="radio" class="option-input" value="C"></b><span>50岁以上</span></label> </li> </ul> </form></div></body></html>
0 0
- laber美化表单小技巧
- 美化file表单的简单小技巧
- Windows 美化及小技巧
- android 关于美化按钮的小技巧
- 表单美化
- html表单小技巧收集
- plsql 8.0以上美化器使用小技巧
- PHP与表单数据交换小技巧
- javascript自动填写表单小技巧
- 表单外观的美化
- form表单美化
- html5 表单元素美化
- HTML5表单美化
- 20150807 表单美化
- 表单美化css
- select表单美化
- 【HTML/CSS】表单美化
- Ubuntu的小美化
- SAT数学练习题五道
- Guava ---- Ordering排序工具
- 收藏一个背包问题九讲
- 第十四周阅读程序(3):流成员函数put,putchar输出字符
- UITabelView的编辑方式以及其他应用
- laber美化表单小技巧
- 关于Fragment
- Java swing实现Visio中对直线、曲线、折线的画及拖动删除
- IOS开发之工欲善其事必先利其器:Xcode
- JSF扩展插件之prettyFaces
- GRE作文模仿要有几个前提条件
- 通过逆向过程构建Springmvc+mybatis+maven+mysql
- 招聘试题
- Android设计模式(六)--工厂方法模式