📜  Material Design Lite-开关

📅  最后修改于: 2020-10-22 05:56:27             🧑  作者: Mango


MDL提供了一系列CSS类,以应用各种预定义的视觉和行为增强功能,并将不同类型的复选框显示为开关。下表列出了可用的类及其效果。

Sr.No. Class Name & Description
1

mdl-switch

Identifies label as an MDL component and is required on label element.

2

mdl-js-switch

Sets basic MDL behavior to label and is required on label element.

3

mdl-switch__input

Sets basic MDL behavior to switch and is required on input element (switch).

4

mdl-switch__label

Sets basic MDL behavior to caption and is required on input element (caption).

5

mdl-js-ripple-effect

Sets ripple click effect and is optional; goes on the label element and not on the input element (switch).

下面的示例将帮助您了解mdl-switch类的使用以及不同类型的复选框作为switch的用法。

mdl_switches.htm


      
            
   
   
   
      
On SwitchOff Switch Disabled Switch

结果

验证结果。