Facebook
From Sharp Bat, 2 Months ago, written in HTML5.
Embed
Download Paste or View Raw
Hits: 52
  1. <link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
  2. <div class="w3-dropdown-click">  
  3. <button onclick="myFunction()" class="w3-button w3-xlarge w3-circle w3-teal">+</button>
  4.  <div id="Demo" class="w3-dropdown-content w3-bar-block w3-border">
  5.     <a href="#" class="w3-bar-item w3-button">Link 1</a>
  6.     <a href="#" class="w3-bar-item w3-button">Link 2</a>
  7.     <a href="#" class="w3-bar-item w3-button">Link 3</a>
  8.   </div>
  9. </div>
  10. function myFunction() {
  11.   var x = document.getElementById("Demo");
  12.   if (x.className.indexOf("w3-show") == -1) {
  13.     x.className += " w3-show";
  14.   } else {
  15.     x.className = x.className.replace(" w3-show", "");
  16.   }
  17. }
  18.