Dropdown

isthebestleonardo(sance)

Dropdown 7

home.php


<html>
<head>
<title>Dropdown 7</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<ul class="menu">
<li><a href="#">Home</a>
<ul class="subMenu">
<li><a href="#">1</a></li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
</ul>
</li>
<li><a href="#">Website</a></li>
<li><a href="#">Tutorial</a>
<ul class="subMenu">
<li><a href="#">A</a></li>
<li><a href="#">B</a></li>
<li><a href="#">C</a></li>
</ul>
</li>
<li><a href="#">About</a></li>
</ul>
</body>
</html>



css/style.css


a{
text-decoration:none;
}
ul,li{
list-style-type:none;
padding:0;
margin:0;

}
ul.menu{
width:700px;
background:blue;
}
ul.menu li:hover{
background:white;
}
ul.menu li{
display:inline-block;
padding:10px 20px;
background:red;
width:100px;
transition:0.9s;
}
ul.menu li:hover ul.subMenu{
display:block;
position:absolute;
margin-top:10px;
margin-left:-20px;
background:white;
transition:0.9s;
}
ul.subMenu{
display:none;
}
ul.subMenu li{
display:block;
}


Dropdown Dropdown Reviewed by Leo on 11:17 Rating: 5

No comments