基于CSS3自定义发光radiobox单选框_html/css_WEB-ITnose

php中文网
发布: 2016-06-24 11:46:27
原创
1262人浏览过

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

在线预览   源码下载

实现的代码。

硅基智能
硅基智能

基于Web3.0的元宇宙,去中心化的互联网,高质量、沉浸式元宇宙直播平台,用数字化重新定义直播

硅基智能62
查看详情 硅基智能

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/

HTML速学教程(入门课程)
HTML速学教程(入门课程)

HTML怎么学习?HTML怎么入门?HTML在哪学?HTML怎么学才快?不用担心,这里为大家提供了HTML速学教程(入门课程),有需要的小伙伴保存下载就能学习啦!

下载
来源:php中文网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
开源免费商场系统广告
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号