পৃষ্ঠাসমূহ

Search Your Article

CS

 

Welcome to GoogleDG – your one-stop destination for free learning resources, guides, and digital tools.

At GoogleDG, we believe that knowledge should be accessible to everyone. Our mission is to provide readers with valuable ebooks, tutorials, and tech-related content that makes learning easier, faster, and more enjoyable.

What We Offer:

  • 📘 Free & Helpful Ebooks – covering education, technology, self-development, and more.

  • 💻 Step-by-Step Tutorials – practical guides on digital tools, apps, and software.

  • 🌐 Tech Updates & Tips – simplified information to keep you informed in the fast-changing digital world.

  • 🎯 Learning Support – resources designed to support students, professionals, and lifelong learners.

    Latest world News 

     

Our Vision

To create a digital knowledge hub where anyone, from beginners to advanced learners, can find trustworthy resources and grow their skills.

Why Choose Us?

✔ Simple explanations of complex topics
✔ 100% free access to resources
✔ Regularly updated content
✔ A community that values knowledge sharing

We are continuously working to expand our content library and provide readers with the most useful and relevant digital learning materials.

📩 If you’d like to connect, share feedback, or suggest topics, feel free to reach us through the Contact page.

Pageviews

Monday, March 6, 2017

Material Design Lite - Radio Buttons

The MDL provides various CSS classes to apply various predefined visual and behavioral enhancements to the display various types of radio buttons. The below table mentions the available classes and their effects.

S.N.Class Name & Description
1mdl-radio
Identifies label as an MDL component and is required on label element.
2mdl-js-radio
Sets basic MDL behavior to label and is required on label element.
3mdl-radio__button
Sets basic MDL behavior to radio and is required on input element (radio button).
4mdl-radio__label
Sets basic MDL behavior to caption and is required on span element (caption).
5mdl-js-ripple-effect
Sets ripple click effectt and is optional goes on label element, not input element (radio button).

Example

The following example showcases the use of mdl-slider classes to show different types of radio buttons.
mdl_radio.htm
<html>
<head>
   <script src="https://storage.googleapis.com/code.getmdl.io/1.0.6/material.min.js"></script>
   <link rel="stylesheet" href="https://storage.googleapis.com/code.getmdl.io/1.0.6/material.indigo-pink.min.css">
   <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">   
   <script langauage="javascript">
      function showMessage(value){
         document.getElementById("message").innerHTML = value;
      }   
   </script>
</head>
<body>
   <table>
      <tr><td>Default Radio Button</td><td>Radio Button with Ripple Effect</td><td>Disabled Radio Button</td></tr>
      <tr><td> 
         <label class="mdl-radio mdl-js-radio" for="option1">
            <input type="radio" id="option1" name="gender" class="mdl-radio__button" checked>
            <span class="mdl-radio__label">Male</span>
         </label>
   </td>
      <td>
         <label class="mdl-radio mdl-js-radio mdl-js-ripple-effect" for="option2">
            <input type="radio" id="option2" name="gender" class="mdl-radio__button" >
            <span class="mdl-radio__label">Female</span>
         </label>
   </td>
       <td>
         <label class="mdl-radio mdl-js-radio" for="option3">
            <input type="radio" id="option3" name="gender" class="mdl-radio__button" disabled>
            <span class="mdl-radio__label">Don't know (Disabled)</span>
         </label>      
    </td>
      </tr>
   </table>   
</body>
</html>

Result

No comments:

Post a Comment