How To Create Dropdown Menu with html and CSS.
<body>
<div class="drop-bttn">
<button class="dropbttn">DROP DOWN</button>
<div class="drop-content">
<a href="#">Home</a>
<a href="#">Service</a>
<a href="#">Contact</a>
<a href="#">Policy</a>
</div>
</div>
</body>
Then apply CSS which is the final stage
<style>
.drop-content {
display:none;
position: absolute;
background-color:#f9f9f9;
min-width:160px;
box-shadow:0 18px 16px 0;
}
.drop-bttn:hover .drop-content {
display:block;
}
.drop-content a {
padding:12px 14px;
text-decoration:none;
color:black;
display:block;
}
</style>
Copy and paste on your text editor
Comments
Post a Comment