Skip to content

Instantly share code, notes, and snippets.

@andimariadi
Created July 6, 2017 00:24
Show Gist options
  • Save andimariadi/ea663ff76d15ec340da430d8f03db49e to your computer and use it in GitHub Desktop.
Save andimariadi/ea663ff76d15ec340da430d8f03db49e to your computer and use it in GitHub Desktop.
kode lengkap styles.css dengan efek lembut di menu dropdown sederhana
nav a:hover {
text-decoration: none;
}
nav ul {
list-style: none;
}
nav ul li {
float: left;
padding: 5px 20px;
}
nav ul li:hover {
background-color: #2980b9;
-webkit-transition: all 0.8s ease-out;
-moz-transition: all 0.8s ease-out;
-ms-transition: all 0.8s ease-out;
-o-transition: all 0.8s ease-out;
transition: all 0.8s ease-out;
}
nav ul li ul {
display: none;
list-style: none;
margin-left: -20px;
}
nav ul li ul li {
float: none;
padding: 5px 20px;
margin-left: -40px;
}
nav ul li ul li:hover {
background-color: #2980b9;
-webkit-transition: all 0.8s ease-out;
-moz-transition: all 0.8s ease-out;
-ms-transition: all 0.8s ease-out;
-o-transition: all 0.8s ease-out;
transition: all 0.8s ease-out;
}
nav ul li:hover > ul {
display: block;
position: absolute;
background: #ddd;
}
nav ul li:hover > a {
color: #fff;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment