welcome to tutorialfamily

css dropdown

css dropdown used for sub-menu.

one menu contain more sub-menu.


dropdown

  • menu dropdown – Used for a sub-menu navigation
  • button dropdown –Used for a sub-menu navigation
  • image dropdown –Used for a sub-menu navigation included image and banner

dropdown


						        
<!DOCTYPE html>
<html>
<head>
<style>
.dropdown-button {
  background-color: #28a095;
  color: white;
  padding: 20px;
  font-size: 18px;
  border: none;
  cursor: pointer;
}

.dropdown-menu {
  position: relative;
  display: inline-block;
}

.dropdown-submenu {
  display: none;
  position: absolute;
  background-color: #f1f1f1;
  min-width: 160px;
  box-shadow: 0px 10px 12px 0px rgba(0,0,0,0.2);
  z-index: 1;
}

.dropdown-submenu a {
  color: black;
  padding: 12px 14px;
  text-decoration: none;
  display: block;
}

.dropdown-submenu a:hover {background-color: #f9f9f9}

.dropdown-menu:hover .dropdown-submenu {
  display: block;
}

</style>
</head>
<body>
<div class="dropdown-menu">
  <button class="dropdown-button">Dropdown</button>
  <div class="dropdown-submenu">
  <a href="#">Home</a>
  <a href="#">About</a>
  <a href="#">Service</a>
  </div>
</div>
</body>
</html>



Run

Our Content