W3Cschool
恭喜您成為首批注冊(cè)用戶
獲得88經(jīng)驗(yàn)值獎(jiǎng)勵(lì)
以下示例介紹不同類型的交換機(jī)。復(fù)選框通過在其父div容器上應(yīng)用類切換來設(shè)置為開關(guān)。
materialize_switches.html
<html> <head> <title>The Materialize Switches Example</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/css/materialize.min.css"> <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/js/materialize.min.js"></script> </head> <body class="container"> <div class="row"> <form class="col s12"> <div class="row"> <label>Materialize Switch</label> <div class="switch"><label>Off<input type="checkbox" checked><span class="lever"></span>On</label></div> </div> <div class="row"> <label>Materialize Disabled Switch</label> <div class="switch"><label>Off<input disabled type="checkbox"><span class="lever"></span>On</label></div> </div> </form> </div> </body> </html>
驗(yàn)證結(jié)果,如下圖所示。
Copyright©2021 w3cschool編程獅|閩ICP備15016281號(hào)-3|閩公網(wǎng)安備35020302033924號(hào)
違法和不良信息舉報(bào)電話:173-0602-2364|舉報(bào)郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號(hào)
聯(lián)系方式:
更多建議: