Material Design Lite Tutorial
Material Design Lite Resources
Selected Reading
- MDL - Tooltips
- MDL - Textfields
- MDL - DataTable
- MDL - Switches
- MDL - Icons
- MDL - Radio Buttons
- MDL - Checkboxes
- MDL - Sliders
- MDL - Menus
- MDL - Spinners
- MDL - Progress Bars
- MDL - Cards
- MDL - Buttons
- MDL - Badges
- MDL - Footers
- MDL - Tabs
- MDL - Grids
- MDL - Layouts
- MDL - Environment Setup
- MDL - Overview
- MDL - Home
Material Design Lite Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
MDL - Spinners
Material Design Lite - Spinners
MDL provides a range of CSS classes to apply various predefined visual and behavioral enhancements and display the different types of spinners. The following table psts down the available classes and their effects.
Sr.No. | Class Name & Description |
---|---|
1 | mdl-spinner Identifies a container as MDL spinner component and is a required class. |
2 | mdl-js-spinner Sets basic MDL behavior to spinner and is a required class. |
3 | is-active Shows and animates the spinner and is optional. |
4 | mdl-spinner--single-color Uses a single color instead of changing colors and is optional. |
Example
The following example will help you understand the use of the mdl-spinner classes and the different types of spinners.
mdl_spinners.htm
<html> <head> <script src = "https://storage.googleapis.com/code.getmdl.io/1.0.6/material.min.js"> </script> <pnk rel = "stylesheet" href = "https://storage.googleapis.com/code.getmdl.io/1.0.6/material.indigo-pink.min.css"> <pnk rel = "stylesheet" href = "https://fonts.googleapis.com/icon?family=Material+Icons"> </head> <body> <h4>Default Spinner</h4> <span class = "mdl-spinner mdl-js-spinner is-active"></span> <h4>Single Color Spinner</h4> <span class = "mdl-spinner mdl-spinner--single-color mdl-js-spinner is-active"></span> </body> </html>
Result
Verify the result.
Advertisements