Monday 7 December 2015

How To create Custom Checkbox and Radio Button Using Pure CSS

In this blog we are going to explain how to create custom checkbox and radio button using CSS. I have write CSS and HTML code separately, You can easily understand complete code. This blog is very useful for developers.

radio-checkbox-button  

CSS :-
  1. **/*Radio button*/
  2. .radio, .checkbox{display: inline-block;}
  3. .radio { padding:5px; margin-left:40px; }
  4. .radio input[type="radio"] { opacity: 0; position: absolute; cursor:pointer;}
  5. .radio input[type="radio"] + label { color:#555; line-height:25px; display:inline-block; text-indent:-38px; }
  6. .radio input[type="radio"]:checked + label > mark:before { content:' '; background:#0d7fbe; width:12px; height:12px; display:inline-block; margin:4px; border-radius:20px;}
  7. ......
  HTML : -
  1. <div class="radio">
  2. <input type="radio" name="id" id="id_0" value="x">
  3. <label for="id_0"><mark></mark> Yes</label>
  4. </div>
  5. <div class="radio">
  6. ......
Read full blog at our highly specific C, Java, PHP, Javascript, iPhone, android developer forum about the topic described above How To create Custom Checkbox and Radio Button Using Pure CSS. You can also learn much more about different programming technologies and can enhance your tech skills.

No comments:

Post a Comment