久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長(zhǎng)資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      css中的classlist的意思是什么

      classList屬性返回元素的類名,作為DOMTokenList對(duì)象,該屬性用于在元素中添加,移除及切換CSS類。classList屬性是只讀的,但你可以使用add()和remove()方法修改它。

      css中的classlist的意思是什么

      本教程操作環(huán)境:windows7系統(tǒng)、CSS3&&HTML5版、Dell G3電腦。

      classList 屬性返回元素的類名,作為 DOMTokenList 對(duì)象。

      該屬性用于在元素中添加,移除及切換 CSS 類。

      classList 屬性是只讀的,但你可以使用 add() 和 remove() 方法修改它。

      語法

      element.classList

      css中的classlist的意思是什么

      方法

      css中的classlist的意思是什么

      實(shí)例:

      <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>document</title> <style> .mystyle {     width: 500px;     height: 50px;     padding: 15px;     border: 1px solid black; } .anotherClass {     background-color: coral;     color: white; } .thirdClass {     text-transform: uppercase;     text-align: center;     font-size: 25px; } </style> </head> <body>  <p>點(diǎn)擊按鈕為 DIV 元素添加多個(gè)類。</p> <button onclick="myFunction()">點(diǎn)我</button> <p><strong>注意:</strong> Internet Explorer 9 及更早 IE 版本瀏覽器不支持 classList 屬性。</p> <div id="myDIV"> 我是一個(gè) DIV 元素。 </div> <script> function myFunction() {     document.getElementById("myDIV").classList.add("mystyle", "anotherClass", "thirdClass"); } </script>  </body> </html>

      效果:

      css中的classlist的意思是什么

      推薦學(xué)習(xí):css視頻教程

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)