基于CSS3自定义发光radiobox单选框
之前我们分享过一些CSS3和HTML5实现的自定义checkbox和Radiobox,比如纯CSS3美化Checkbox和Radiobox按钮,不仅外观唯美,而且Radiobox选中时还有动画效果。今天我们要来分享一款CSS3实现的自定义发光radiobox单选框插件,该radiobox选中时也有滑块的动画特效。

实现的代码。
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自定义发光radiobox单选框的更多相关文章
- CSS3自定义发光radiobox单选框
在线演示 本地下载
- 基于CSS3自定义美化复选框Checkbox组合
今天我们要来分享一组非常漂亮的CSS3自定义复选框checkbox,每一个checkbox都有其各自的特点.有几款checkbox在选中的情况下还会出现动画效果,非常不错的CSS3自定义美化check ...
- vue2实现自定义样式radio单选框
先上效果 <div class="reply"> 主编已回复: <div class="radio-box" v-for="(ite ...
- CSS3自定义checkbox复选框
在线演示 本地下载
- 10个HTML5美化版复选框和单选框
单选框Radiobox和复选框checkbox在网页中也十分常见,虽然它没有按钮的交互性强,但是如果能把它们像按钮那样美化一下,那也是非常不错的.本文收集了10个相对比较漂亮的美化版单选框和复选框,希 ...
- 纯CSS3来自定义单选框radio与复选框checkbox
单选框(radio)自定义样式 ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 3 ...
- (七)对话框,单选框(radiobox),复选框(checkbox),列表框(ListBox),组合框(CComboBox),水平滚动条(Horizontal scroll bar),微调(旋转)spincontrol,列表视图控件CListCtrl,静态控件static
1,模态对话框和非模态对话框 // 模态对话框 void CMainFrame::OnDialogExec() { // TODO: 在此添加命令处理程序代码 // 创建对话框对象 CDialog d ...
- 复选框(checkbox)、单选框(radiobox)的使用
复选框(checkbox).单选框(radiobox)的使用 复选框: HTML: // 复选框 <input type="checkbox" name="chec ...
- CSS学习笔记三:自定义单选框,复选框,开关
一点一点学习CCS,这次学习了如何自定义单选框,复选框以及开关. 一.单选框 1.先写好body里面的样式,先写几个框 <body> <div class="radio-1 ...
随机推荐
- 插入UUID,出现Data truncation: Data too long for column 'id' at row 1
ssc.udf.register("getuuid", () => UUID.randomUUID().toString) val stuPCountDF_tmp1=ssc. ...
- Eclipse c++ 编译调试
直接添加源文件方法: 右键选择工程->import->General->File System,在弹出的对话框中选择源文件目录,筛选文件后: 1.如果直接加到工程中,点Finish就 ...
- 腾讯开放平台 iOS应用URL schema、Bundle ID填写 (含微博、微信)
解释如下: qq比较麻烦点,需要两个 URL schemes 1.QQ+appID(注意:appID原本是10进制的,需要先转换16进制,网址:点击转换16进制) 2.tencent+appID 结束
- IDEA编辑区光标样式修改
转自:http://blog.csdn.net/aosica321/article/details/52787418 Intellj IDEA光标为insert状态,无法删除内容以前用得是社区版的ID ...
- matplot模块中的pylab
pylab的目的 Pylab combines the functionality of pyplot with the capabilities of NumPy in a single names ...
- php 内存管理
内存是计算机⾮常关键的部件之⼀,是暂时存储程序以及数据的空间,CPU只有有限的寄存器可以⽤于存储计算数据,⽽⼤部分的数据都是存储在内存中的,程序运⾏都是在内存中进⾏的.和CPU计算能⼒⼀样, 内存也是 ...
- Android Developers:使ListView滑动流畅
流畅滑动ListView的关键是保持应用程序的主线程(UI线程)从免于繁重处理.确保你的任何硬盘访问,网络访问或者SQL访问在一个单独的线程中.为了测试你的应用个程序的状态,你能启动StrictMod ...
- Response.Flush() Response.End()的区别
//Response.Flush() 将缓存中的内容立即显示出来//Response.End() 缓冲的输出发送到客户端 停止页面执行//例://Response.Write("520& ...
- JMeter ----请求数据参数设置-自动增长变量
使用Jmeter性能测试的时候, 需要录入一些测试数据, 当这些数据要插入数据库的时候, 数据库通常会要求数据不能重复, 所以无法使用同一个数据反复进行测试, 这时候就需要在每次请求的时候使用不同的请 ...
- hibernate validator工具类
一.相关的gradle配置文件 // https://mvnrepository.com/artifact/javax.el/javax.el-api compile group: 'javax.el ...