基于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 ...
随机推荐
- 在notepad++中运行python代码
#在notepad++中运行python代码 ''' 1.安装插件pyNPP, 2.允许插件pyNPP中的第一个和第二个选项即可,如果代码过少代码执行一闪而过,可能无法看到,可加入少量sleep时间即 ...
- linux YUM常用 命令
语法 yum(选项)(参数) 选项 -h:显示帮助信息: -y:对所有的提问都回答“yes”: -c:指定配置文件: -q:安静模式: -v:详细模式: -d:设置调试等级(0-10): -e:设置错 ...
- iOS-仿京东6位密码支付输入框
概述 用于安全支付的密码支付输入框. 详细 代码下载:http://www.demodashi.com/demo/10709.html 开发需求中有时候我们需要用于安全支付的功能, 需要设置APP钱包 ...
- 【微信小程序】实现类似WEB端【返回顶部】功能
1.原理:利用小程序自带的<scroll-view>组件,该组件的bindScroll和scroll-top方法.属性进行联合操作 2.效果图: 3.wxml: <scroll-vi ...
- TP3.2校验微信公众号||小程序 服务器地址
1.在TP3.2里面,写一个控制器,用来校验微信公众号||小程序的服务器地址 <?php namespace Home\Controller; use Think\Controller; hea ...
- Servlet线程安全性
问题:使用以下的代码演示servlet的线程安全问题? public class MultiThreadQuestion extends HttpServlet { public int count ...
- 【LeetCode】25. Reverse Nodes in k-Group (2 solutions)
Reverse Nodes in k-Group Given a linked list, reverse the nodes of a linked list k at a time and ret ...
- 【LeetCode】107. Binary Tree Level Order Traversal II (2 solutions)
Binary Tree Level Order Traversal II Given a binary tree, return the bottom-up level order traversal ...
- HawkHost退款流程详解
http://www.senzw.com/newsfile/2011928115323.htmlHawkhost提供30天退款保证,退款流程也比较简单,下面为大家介绍一下整个退款流程. 首先登录客户中 ...
- Linux命令-终止进程命令:pkill
killall是杀死所有进程,而pkill是按照进程名称杀死进程,可以达到杀死所有进程的目的,因为linux里面同名的进程是分主进程和子进程的. pkill - httpd 按名称强制杀死httpd进 ...