基于CSS3自定义发光radiobox单选框
2015-04-11 08:54
519 查看
之前我们分享过一些CSS3和HTML5实现的自定义checkbox和Radiobox,比如纯CSS3美化Checkbox和Radiobox按钮,不仅外观唯美,而且Radiobox选中时还有动画效果。今天我们要来分享一款CSS3实现的自定义发光radiobox单选框插件,该radiobox选中时也有滑块的动画特效。
![](http://pic.w2bc.com/upload/201504/03/201504031313514237.jpg)
在线预览 源码下载
实现的代码。
html代码:
via:http://www.w2bc.com/Article/32018/
![](http://pic.w2bc.com/upload/201504/03/201504031313514237.jpg)
在线预览 源码下载
实现的代码。
html代码:
<style> html { display: flex; justify-content: center; align-items: center; height: 100%; } body { padding: 50px; background-color: hsl(0,0%,20%); } input { -webkit-appearance: none; /* remove default */ display: block; margin: 10px; width: 24px; height: 24px; border-radius: 12px; cursor: pointer; vertical-align: middle; box-shadow: hsla(0,0%,100%,.15) 0 1px 1px, inset hsla(0,0%,0%,.5) 0 0 0 1px; background-color: hsla(0,0%,0%,.2); background-image: -webkit-radial-gradient( hsla(200,100%,90%,1) 0%, hsla(200,100%,70%,1) 15%, hsla(200,100%,60%,.3) 28%, hsla(200,100%,30%,0) 70% ); background-repeat: no-repeat; -webkit-transition: background-position .15s cubic-bezier(.8, 0, 1, 1), -webkit-transform .25s cubic-bezier(.8, 0, 1, 1); } input:checked { -webkit-transition: background-position .2s .15s cubic-bezier(0, 0, .2, 1), -webkit-transform .25s cubic-bezier(0, 0, .2, 1); } input:active { -webkit-transform: scale(1.5); -webkit-transition: -webkit-transform .1s cubic-bezier(0, 0, .2, 1); } /* The up/down direction logic */input, input:active { background-position: 0 24px; } input:checked { background-position: 0 0; } input:checked ~ input, input:checked ~ input:active { background-position: 0 -24px; } </style> <script src="js/prefixfree.min.js"></script> </head> <body> <script src="/scripts/2bc/_gg_980_90.js" type="text/javascript"></script> <div style="margin: 30px auto; width: 80px;"> <input type="radio" name="name" checked /> <input type="radio" name="name" /> <input type="radio" name="name" /> <input type="radio" name="name" /> <input type="radio" name="name" /> </div> <script src="js/index.js"></script> </body>
via:http://www.w2bc.com/Article/32018/
相关文章推荐
- 基于CSS3自定义美化复选框Checkbox组合
- CSS3制作炫酷的自定义发光文字
- Scott Mitchell 的ASP.NET 2.0数据教程之十一: 基于数据的自定义格式化
- asp.net不要Windows认证,自定义基于数据库的安全认证
- 基于ArcGIS Engine + C#实现用户自定义动态电力符号(转载 华立电网北京研发中心 阿文 )
- 基于Axis的自定义对象序列化
- 基于WTL Windows Mobile 的自定义滚动条和列表
- 如何让自定义的基于CStatic的控件响应鼠标移动的消息
- 基于ArcGIS Engine + C#实现用户自定义动态电力符号
- asp.net 2.0 自定义 基于 Table 的 Profile Provide
- 基于Axis的自定义对象序列化
- 基于多线程技术和自定义消息编程实现Windows 9x异步串行通信
- 基于Provider的自定义服务
- Scott Mitchell 的ASP.NET 2.0数据教程之十一: 基于数据的自定义格式化
- [译]Scott Mitchell 的ASP.NET 2.0数据教程之十一: 基于数据的自定义格式化
- QForm 基于 Web的自定义表单系统
- 基于ASP.NET的自定义分页显示
- 基于ASP.NET的自定义分页显示
- 基于office interop的自定义报表系统
- 基于SWT的Sash和FormLayout的自定义分隔窗体