Radiobox single lens, css3radiobox

Source: Internet
Author: User

Radiobox single lens, css3radiobox

We have previously shared some custom checkbox and Radiobox implemented by CSS3 and HTML5, such as pure CSS3 beautifying the Checkbox and Radiobox buttons, which not only have beautiful appearance, but also have animated effects when Radiobox is selected. Today, we will share a customized luminous radiobox single-lens plug-in implemented by CSS3. This radiobox also has a slider animation effect when selected.

Download Online Preview source code

Implementation code.

Html code:

 <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>

Via: http://www.w2bc.com/Article/32018/

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.