Changes

Jump to navigation Jump to search

Test

1,612 bytes added, 18:59, 29 March 2020
no edit summary
<html><head><meta name="viewport" content="width=device-width, initial-scale=1"><style>.dropbtn { background-color: #3498DB; color: white; padding: 16px; font-size: 16px; border: none; cursor: pointer;} .dropbtn:hover, .dropbtn:focus { background-color: #2980B9;} .dropdown { position: relative; display: inline-block;} .dropdown-content { display: none; position: absolute; background-color: #f1f1f1; min-width: 160px; overflow: auto; box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); z-index: 1;} .dropdown-content a { color: black; padding: 12px 16px; text-decoration: none; display: block;} .dropdown a:hover {background-color: #ddd;} .show {display: block;}</style></head><body> <h2>Clickable Dropdown</h2><p>Click on the button to open the dropdown menu.</p> <div class="dropdown"> <button onclick="myFunction()" class="dropbtn">Dropdown|Name</button> <div id=Name|Value1"myDropdown" class=[[Hello]]|Value2"dropdown-content"> <a href="#home">Home</a> <a href=[[Wikipedia|'pedia]]|Value3"#about">About</a> <a href=[https:"#contact">Contact</a> </div></div> <script>/* When the user clicks on the button, toggle between hiding and showing the dropdown content */wwwfunction myFunction() { document.googlegetElementById("myDropdown").coclassList.intoggle("show");} / Google/ Close the dropdown if the user clicks outside of itwindow.onclick = function(event) { if (!event.target.matches('.dropbtn')) { var dropdowns = document.getElementsByClassName("dropdown-content"); var i; for (i = 0; i < dropdowns.length; i++) { var openDropdown = dropdowns[i]; if (openDropdown.classList.contains('show')) { openDropdown.classList.remove('show'); } } }}</script> </body></html> 
----

Navigation menu