<!-- Css Code Start-->
<style>.dropbtn {
background-color: blue;
color: white;
padding: 16px;
font-size: 16px;
border: none;
}
.dropdown {
position: relative;
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: white;
min-width: 160px;
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;
transition:0.5s;
}
.dropdown-content a:hover {
background-color: red;
box-shadow: 1px 2px 5px 2px rgba(23, 23, 23, 0.93);
transition:0.5s;
}
.dropdown:hover .dropdown-content {
display: block;
box-shadow: 1px 2px 5px 2px rgba(23, 23, 23, 0.93);
transition:0.5s;
}
.dropdown:hover .dropbtn {
background-color: black;
box-shadow: 1px 2px 5px 2px rgba(23, 23, 23, 0.93);
}
</style>
<!-- Css Code End-->
Html Code :
<!--html code start-->
<div class="dropdown"><button class="dropbtn">Dropdown</button>
<div class="dropdown-content">
<a href="#">Link 1</a>
<a href="#">Link 2</a>
<a href="#">Link 3</a>
</div>
</div>
<!--html code end-->
Post a Comment