3 Cool CSS3 check boxes checkbox animation effects

Source: Internet
Author: User

This is a very cool CSS3 check box checkbox for animation effect. This set of check box animation effects a total of 3 effects, they are on the basis of the native checkbox elements to beautify, when the user clicked the check box to create a very cool animation effect.

Online preview Source Download

How to useHTML Structure

The style of the normal HTML CheckBox control is very dull. In modern web design, we can use the CSS3 to set a more beautiful appearance and animation effects. Through the CSS @keyframe properties, we can create a variety of magic check box animation effects.

In the demo of these check box animations, the unordered list structure is used. Each list item has an <checkbox> element and an element <label> .

<ul>  <Li>      <inputtype= "checkbox"name= "Manager"ID= "Manager" />      <label for= "Manager">Project Manager</label>  </Li>  <Li>      <inputtype= "checkbox"name= "Webdesigner"ID= "Webdesigner" />      <label for= "Webdesigner">Web Designer</label>  </Li>  <Li>      <inputtype= "checkbox"name= "WebDev"ID= "WebDev" />      <label for= "WebDev">Website Technician</label>  </Li>  <Li>      <inputtype= "checkbox"name= "SEO"ID= "SEO" />      <label for= "SEO">Seo</label>  </Li>  <Li>      <inputtype= "checkbox"name= "Itstaff"ID= "Itstaff" />      <label for= "Itstaff">IT technician</label>  </Li>  <Li>      <inputtype= "checkbox"name= "CSR"ID= "CSR" />      <label for= "CSR">Customer Service Representative</label>  </Li></ul>             
CSS Styles

In CSS styles, the native checkbox is first hidden.

{    display: none;}        

The label relative positioning and some padding values are then set on the element. Then we need to use the label elements :before and :after pseudo-elements, because here to use the Font awesome fonts icon, so its font is set to FontAwesome .

/*Checkbox Icons*/label{position:relative;Padding-left:30px;font-size:30px;cursor:Pointer;Color:#fff;padding:16px 28px 0 0;}Label:before, Label:after{font-family:Fontawesome;font-size:50px;/*absolutely positioned*/position:Absolute;Top:0; Left:-49px; Right:10px;}

3 Cool CSS3 check boxes checkbox animation effects

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.