পৃষ্ঠাসমূহ

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

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

S.N.Class Name & Description
1mdl-button
Sets button as an MDL component, required.
2mdl-js-button
Adds basic MDL behavior to button, required.
3(none)
Sets flat display effect to button, default.
4mdl-button--raised
Sets raised display effect, can be used mutual exclusively with fab, mini-fab, and icon.
5mdl-button--fab
Sets fab (circular) display effect, can be used mutual exclusively with raised, mini-fab, and icon.
6mdl-button--mini-fab
Sets mini-fab (small fab circular) display effect,can be used mutual exclusively with raised, fab, and icon.
7mdl-button--icon
Sets icon (small plain circular) display effect, can be used mutual exclusively with raised, fab, and mini-fab.
8mdl-button--colored
Sets colored display effect where the colors are defined in material.min.css.
9mdl-button--primary
Sets primary color display effect where the colors are defined in material.min.css.
10mdl-button--accent
Sets accent color display effect where the colors are defined in material.min.css.
11mdl-js-ripple-effect
Sets ripple click effect, can be used in combination with any other classes.

Example

The following example showcases the use of mdl-button classes to show different types of buttons.
mdl_buttons.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">   
   </head>
<body>
   <table border="0">
   <tbody>
      <tr>
         <td><button class="mdl-button mdl-js-button mdl-button--fab mdl-button--colored"><i class="material-icons">add</i></button></td>
         <td><button class="mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect mdl-button--colored"><i class="material-icons">add</i></button></td>
         <td> </td>
      </tr>
      <tr>
         <td>Colored fab (circular) display effect</td>
         <td>Colored fab (circular) with ripple display effect</td>
         <td> </td>
      </tr> 
      <tr>
         <td><button class="mdl-button mdl-js-button mdl-button--fab"><i class="material-icons">add</i></button></td>
         <td><button class="mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect"><i class="material-icons">add</i></button></td>
         <td><button class="mdl-button mdl-js-button mdl-button--fab" disabled><i class="material-icons">add</i></button></td>
      </tr>
      <tr>
         <td>Plain fab (circular) display effect</td>
         <td>Plain fab (circular) with ripple display effect</td>
         <td>Plain fab (circular) and disabled</td>
      </tr> 
      <tr>
         <td><button class="mdl-button mdl-js-button mdl-button--raised"><i class="material-icons">add</i></button></td>
         <td><button class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect"><i class="material-icons">add</i></button></td>
         <td><button class="mdl-button mdl-js-button mdl-button--raised" disabled><i class="material-icons">add</i></button></td>
      </tr>
      <tr>
         <td>Raised button</td>
         <td>Raised button with ripple display effect</td>
         <td>Raised button and disabled</td>
      </tr>
      <tr>
         <td><button class="mdl-button mdl-js-button mdl-button--raised mdl-button--colored"><i class="material-icons">add</i></button></td>
         <td><button class="mdl-button mdl-js-button mdl-button--raised mdl-button--accent"><i class="material-icons">add</i></button></td>
         <td><button class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent"><i class="material-icons">add</i></button></td>
      </tr>
      <tr>
         <td>Colored Raised button</td>
         <td>Accent-colored Raised button</td>
         <td>Accent-colored raised button with ripple effect</td>
      </tr>    
      <tr>
         <td><button class="mdl-button mdl-js-button"><i class="material-icons">add</i></button></td>
         <td><button class="mdl-button mdl-js-button mdl-js-ripple-effect"><i class="material-icons">add</i></button></td>
         <td><button class="mdl-button mdl-js-button" disabled><i class="material-icons">add</i></button></td>
      </tr>
      <tr>
         <td>Flat button</td>
         <td>Flat button with ripple effect</td>
         <td>Disabled flat button</td>
      </tr> 
      <tr>
         <td><button class="mdl-button mdl-js-button mdl-button--primary"><i class="material-icons">add</i></button></td>
         <td><button class="mdl-button mdl-js-button mdl-button--accent"><i class="material-icons">add</i></button></td>
         <td> </td>
      </tr>
      <tr>
         <td>Primary Flat button</td>
         <td>Accent-colored Flat button</td>
         <td> </td>
      </tr> 
      <tr>
         <td><button class="mdl-button mdl-js-button mdl-button--icon"><i class="material-icons">add</i></button></td>
         <td><button class="mdl-button mdl-js-button mdl-button--icon mdl-button--colored"><i class="material-icons">add</i></button></td>
         <td> </td>
      </tr>
      <tr>
         <td>Icon button</td>
         <td>Colored Icon button</td>
         <td> </td>
      </tr> 
      <tr>
         <td><button class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab"><i class="material-icons">add</i></button></td>
         <td><button class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored"><i class="material-icons">add</i></button></td>
         <td> </td>
      </tr>
      <tr>
         <td>Mini Colored fab (circular) display effect</td>
         <td>Mini Colored fab (circular) with ripple display effect</td>
         <td> </td>
      </tr>   
      </tbody>
   </table>
</body>
</html>

Result

Verify the result.

No comments:

Post a Comment