css3 复选框样式
来源:互联网 发布:知微科技有限公司 编辑:程序博客网 时间:2024/05/14 22:01
<style> body,input,label{ margin: 0; padding: 0; } /*第一个复选框样式*/ .checkbox1{ width: 980px; margin: 0 auto; background-color: burlywood; text-align: center; padding: 3% 0; } .checkbox1 label{ display: inline-block; width: 10px; height: 10px; padding: 9px; background-color: #fff; border: 1px solid #fff; border-radius: 4px; margin-right: 10px; cursor: pointer; overflow: hidden; position: relative; } .checkbox1 label:after{ content: 'X'; background-color: cadetblue; color: #ffffff; width: 26px; height: 26px; position: absolute; left: 1px; top: 1px; line-height: 26px; border-radius: 4px; text-align: center; transform:translateY(-30px); transition:transform .2s ease-out; } .checkbox1 [type="checkbox"]:checked + label:after{ transform:translateY(0px); transition:transform .2s ease-in; } .checkbox1 input{ display: none; } /*第二个复选框样式*/ .checkbox2{ width: 980px; background-color: coral; padding: 3% 0; text-align: center; margin: 0 auto; } .checkbox2 label{ display: inline-block; width: 68px; height: 34px; border: 1px solid #fff; margin-right: 10px; position: relative; background-color: #ffffff; border-radius: 18px; overflow: hidden; cursor: pointer; position: relative; transition:left .1s ease-in; transition:background-color .1s ease-in; } .checkbox2 label:after{ content:''; width:30px ; height: 30px; left:1px ; top:1px ; position: absolute; border: 1px solid antiquewhite; border-radius: 15px; transition:left .1s ease-out; } .checkbox2 [type="checkbox"]:checked + label{ background-color: #999; transition:background-color .1s ease-in; } .checkbox2 [type="checkbox"]:checked + label:after{ left: 35px; transition:left .1s ease-in; } .checkbox2 input{ display: none; } </style><pre name="code" class="html"><div class="checkbox1"> <input type="checkbox" name="checkbox-1" checked="checked" id="checkbox1-1"/> <label for="checkbox1-1"></label> <input type="checkbox" name="checkbox-2" id="checkbox1-2"/> <label for="checkbox1-2"></label> <input type="checkbox" name="checkbox-3" id="checkbox1-3"/> <label for="checkbox1-3"></label></div><div class="checkbox2"> <input type="checkbox" name="checkbox-1" checked="checked" id="checkbox2-1"> <label for="checkbox2-1"></label> <input type="checkbox" name="checkbox-1" id="checkbox2-2"> <label for="checkbox2-2"></label> <input type="checkbox" name="checkbox-1" id="checkbox2-3"> <label for="checkbox2-3"></label></div>
0 0
- css3 复选框样式
- 纯css3自定义复选框checkbox样式
- 纯css3单选框和复选框样式美化效果
- 11种超酷CSS3复选框样式美化效果
- 纯css3单选框和复选框样式美化效果
- 自定义复选框样式
- 自定义复选框样式
- 复选框 单选框 样式
- 自定义复选框样式
- 仿复选框样式
- CSS3自定义Checkbox复选框
- 自定义复选框,复选框样式修改,重写复选框
- 自定义复选框,复选框样式修改,重写复选框
- 修改复选框默认样式
- 修改复选框默认样式
- 改变复选框显示样式
- 复选框样式化综合
- QTreeView 复选框样式修改
- java中double四舍五入并设置小数点位数的问题
- 数据结构 — 1. 两个非递减有序单链表合并为非递增有序单链表
- Maven NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config
- MMORPG游戏设计学习笔记·游戏策划简述
- IOS UILabel显示HTML字符串
- css3 复选框样式
- 拖动实现listview的item改变顺序(DragSortListView)
- uibutton实现左文字右图片
- gitlab本地仓库搭建(待整理)
- (四)MySQL InnoDB锁类型及幻象读问题
- bzoj1063: [Noi2008]道路设计
- android开发中用到的px、dp、sp
- C# 一步一步完成一个简单的计算器 第一步---搭建计算器界面
- Struts2 与Sprin MVC的区别