Asp.net modules
  • Home
  • c# Modules
  • Web Design
    • Html
    • Css
    • Java Script
  • Bootstrap
  • Sql
    • Queries
    • Stored Procedures
  • About Me
    • About Myself
    • My Projects
    • My Resume
  • Photo Gallery

Thursday, May 12, 2016

RadioButton Style with css

 Unknown     5:46 AM     css     No comments   

Intoduction :- 
Hii Friends...
Have you ever wanted to use your own style in  radio buttons ? This script will let you do that  Easily. This can possible with the help of css .This works flawlessly in Firefox, Safari, Internet Explorer 7, Opera and others.So go ahead, CSS form styling is this easy. Now I am going to put this with Example.
DEMO:- 
 
Example :-
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js" type="text/javascript"></script> 
<style type="text/css" >
.change {
      position: absolute;
      top: 50%;
      left: 50%;
      width: 150px;
      height: 50px;
      text-align: center;
      margin: -30px 0px 0px -75px;
      background: rgb(36, 159, 163);
      -webkit-transition: all 0.2s ease;
      -moz-transition: all 0.2s ease;
      -ms-transition: all 0.2s ease;
      transition: all 0.2s ease;
    }
    .change span {
      position: absolute;
      width: 20px;
      height: 4px;
      top: 50%;
      left: 50%;
      margin: -2px 0px 0px -4px;
      background: #ffffff;
      display: block;
      -webkit-transform: rotate(-45deg);
      -webkit-transition: all 0.2s ease;
      -moz-transform: rotate(-45deg);
      -moz-transition: all 0.2s ease;
      -ms-transform: rotate(-45deg);
      -ms-transition: all 0.2s ease;
      transform: rotate(-45deg);
      transition: all 0.2s ease;
    }
    .change span:after {
      content: "";
      display: block;
      position: absolute;
      width: 4px;
      height: 12px;
      margin-top: -8px;
      background: #ffffff;
      -webkit-transition: all 0.2s ease;
      -moz-transition: all 0.2s ease;
      -ms-transition: all 0.2s ease;
      transition: all 0.2s ease;
    }
    input[type=radio] {
      display: none;
    }
    .change label {
      cursor: pointer;
      color: rgba(0, 0, 0, 0.2);
      width: 60px;
      font-family: 'Roboto';
      font-weight: 400;
      line-height: 50px;
      -webkit-transition: all 0.2s ease;
      -moz-transition: all 0.2s ease;
      -ms-transition: all 0.2s ease;
      transition: all 0.2s ease;
    }
    label[for=yes] {
      position: absolute;
      left: 0px;
      height: 20px;
    }
    label[for=no] {
      position: absolute;
      right: 0px;
    }
    #no:checked ~ .change {
      background: #eb4f37;
    }
    #no:checked ~ .change span {
      background: #ffffff;
      margin-left: -8px;
    }
    #no:checked ~ .change span:after {
      background: #ffffff;
      height: 20px;
      margin-top: -8px;
      margin-left: 8px;
    }
    #yes:checked ~ .change label[for=yes] {
      color: #ffffff;
    }
    #no:checked ~ .change label[for=no] {
      color: #ffffff;
    }
 </style>
    <div align="center" style="position:relative; padding:120px 0px;">
      <div class="toggle-radio">
        <input type="radio" name="rdo" id="yes" checked>
        <input type="radio" name="rdo" id="no">
        <div class="change">
          <label for="yes">Yes</label>
          <label for="no">No</label>
          <span></span>
        </div>
      </div>
    </div>
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
Email ThisBlogThis!Share to XShare to Facebook
Newer Post Older Post Home

0 comments:

Post a Comment

Popular Posts

  • Asp.net insert, Edit, update, delete in grid view
    Introduction :   Here I explain how to insert, edit, update and delete data in grid view using asp.net. In this project I use so...
  • Angular Directives
    Intoduction :-   Hii Friends... Today I explain about Angular Directives.  1) Angular JS use new attribute i.e called Directives. 2)...
  • How to make color picker
    Intoduction :-   Hii Friends... Today i going to put a very interesting module i.e how to make a color picker module. Its very interesti...
  • How To Make A Calculator In Html
    Intoduction :- Hii Friends... Today I explain how to make a calculator with html. So here i explain this step by step. Step : 1    Th...
  • Angular Js Introduction
    Intoduction :-   Hii Friends... Today I explain about angular js. Angular js is a part of javascript but its extended. 1 ) AngularJS ...
  • Calculator with Angular JS
    Intoduction :-   Hii Friends... Today I explain how to make a Calculator with the help of Angular JS. In this code i use some directive...
  • Bootstrap Model
      Intoduction :-   Hii Friends... Today I explain how to make a bootstrap model in asp.net . Its not so complicated its easy. here som...
  • Bounce a circle with Css
    Intoduction :-   Hii Friends... Today I explain how to make a bouncing circle with the help of css.  DEMO:- ...
  • How To Make Semi-Transparent Buttons
    Intoduction :-   Hii Friends...   Today I explain how to make Semi-Transparent Buttons with the help of css. This style now a days goes t...
  • How To Make A Timer With JavaScript
    Introduction :- Hii Friends.. Today I explain how to make a timer with a popup message with the help of Java-Script. At the end when tim...

Blog Archive

  • ►  2017 (13)
    • ►  December (1)
    • ►  March (5)
    • ►  February (1)
    • ►  January (6)
  • ▼  2016 (31)
    • ►  November (1)
    • ►  September (1)
    • ►  June (6)
    • ▼  May (3)
      • css box sliding style on hover
      • css box style
      • RadioButton Style with css
    • ►  April (2)
    • ►  March (8)
    • ►  February (9)
    • ►  January (1)
  • ►  2015 (31)
    • ►  December (3)
    • ►  November (4)
    • ►  October (18)
    • ►  September (6)

About Me

Unknown
View my complete profile

Copyright © Asp.net modules | Powered by Blogger
Design by Sheetal Khandelwal