Jump to content


Popular Content

Showing content with the highest reputation since 08/27/2020 in Posts

  1. 1 point
    If you have multiple elements, you have to call the function multiple times. It could be done in a loop. var elements = document.getElementsByClassName("myClass"); for(var i = 0; i < elements.length; i++) { w3CodeColor(elements[i]); }
  2. 1 point
    <div class="navbar"> <a href="#home" class="bkcolor1">Home</a> <a href="#news" class="bkcolor2">News</a> <div class="dropdown"> <button class="dropbtn bkcolor3">Dropdown <i class="fa fa-caret-down"></i> </button> <div class="dropdown-content"> <a href="#" class="bkcolor4">Link 1</a> <a href="#" class="bkcolor5">Link 2</a> <a href="#" class="bkcolor6">Link 3</a> </div> </div> </div> .bkcolor1{background: "red";} .bkcolor2{background: "orange";} .bkcolor3{background: "yellow";} .bkcolor4{background: "green";} .bkcolor5{background: "blue";} .bkcolor6{background: "indigo";}
  • Create New...