http://www.w3schools.com/css/tryit.asp?filename=trycss_dropdown_text

Ek Olarak: http://www.w3schools.com/howto/howto_css_dropdown.asp

Ek Olarak: SENİN İSTEDİĞİN: http://www.w3schools.com/howto/howto_js_dropdown.asp

Ek Olarak:

Ek Olarak:






Clickable Dropdown


Click on the button to open the dropdown menu.





<script>
/* When the user clicks on the button,
toggle between hiding and showing the dropdown content */
function myFunction() {
document.getElementById("myDropdown").classList.toggle("show");
}

// Close the dropdown if the user clicks outside of it
window.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>