পৃষ্ঠাসমূহ

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

The Material Design Lite (MDL) tab component is a user interface component which helps to show multiple screens in a single space in exclusive manner.
The MDL provides various CSS classes to apply various predefined visual and behavioral enhancements to the tabs. The below table mentions the available classes and their effects.

S.N.Class Name & Description
1mdl-layout
Identifies a container as an MDL component. Required on outer container element.
2mdl-tabs
Identifies a tabs container as an MDL component. Required on "outer" div element.
3mdl-js-tabs
Sets basic MDL behavior to tabs container. Required on "outer" div element.
4mdl-js-ripple-effect
Adds ripple click effect to tab links. Optional; goes on "outer" div element.
5mdl-tabs__tab-bar
Identifies a container as an MDL tabs link bar. Required on first "inner" div element.
6mdl-tabs__tab
Identifies an anchor (link) as an MDL tab activator. Required on all links in first "inner" div element.
7is-active
Identifies a tab as the default display tab. Required on one (and only one) of the "inner" div (tab) elements.
8mdl-tabs__panel
Identifies a container as tab content. Required on each of the "inner" div (tab) elements.

Example

The following example showcases the use of mdl-tab class to layout contents on various tabs.
Here following MDL classes are used.
  1. mdl-layout - Identifies a div as an MDL component.
  2. mdl-js-layout - Adds basic MDL behavior to outer div.
  3. mdl-layout--fixed-header - Makes the header always visible, even in small screens.
  4. mdl-layout__header-row - Identifies container as MDL header row.
  5. mdl-layout-title - Identifies layout title text.
  6. mdl-layout__content - Identifies div as MDL layout content.
  7. mdl-tabs - Identifies a tabs container as an MDL component.
  8. mdl-js-tabs - Sets basic MDL behavior to tabs container.
  9. mdl-tabs__tab-bar - Identifies a container as an MDL tabs link bar.
  10. mdl-tabs__tab - Identifies an anchor (link) as an MDL tab activator.
  11. is-active - Identifies a tab as the default display tab.
  12. mdl-tabs__panel - Identifies a container as tab content.
mdl_tabs.htm
<html>
   <head>
      <link rel="stylesheet" href="https://storage.googleapis.com/code.getmdl.io/1.0.6/material.indigo-pink.min.css">
      <script src="https://storage.googleapis.com/code.getmdl.io/1.0.6/material.min.js"></script>
      <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
   </head>
   <body>
    <div class="mdl-layout mdl-js-layout mdl-layout--fixed-header">
      <header class="mdl-layout__header">
         <div class="mdl-layout__header-row">      
            <span class="mdl-layout-title">Material Design Tabs</span>          
         </div>       
      </header>     
      <main class="mdl-layout__content">    
         <div class="mdl-tabs mdl-js-tabs">
            <div class="mdl-tabs__tab-bar">
               <a href="#tab1-panel" class="mdl-tabs__tab is-active">Tab 1</a>
               <a href="#tab2-panel" class="mdl-tabs__tab">Tab 2</a>
               <a href="#tab3-panel" class="mdl-tabs__tab">Tab 3</a>
            </div>
            <div class="mdl-tabs__panel is-active" id="tab1-panel">
               <p>Tab 1 Content</p>
            </div>
            <div class="mdl-tabs__panel" id="tab2-panel">
               <p>Tab 2 Content</p>
            </div>
            <div class="mdl-tabs__panel" id="tab3-panel">
               <p>Tab 3 Content</p>
            </div>
         </div>
   </main>
   </body>
</html>

Result

Verify the result.

No comments:

Post a Comment