Skip to content

Instantly share code, notes, and snippets.

@codenart
Last active June 26, 2018 03:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codenart/e35ac23245ec8d2d506c280cd6751ef2 to your computer and use it in GitHub Desktop.
Save codenart/e35ac23245ec8d2d506c280cd6751ef2 to your computer and use it in GitHub Desktop.
Using for tutorials on codenart.github.io
.dropdown {
font-family: Arial, sans-serif;
font-size: 16px;
display: inline-block;
position: relative;
}
.dropdown-btn {
font-size: 14px;
font-weight: bold;
letter-spacing: 1px;
padding: 15px 30px;
color: White;
border: none;
cursor: pointer;
}
.dropdown-btn.primary {
background: RoyalBlue;
}
.dropdown-btn.primary:hover {
background: DodgerBlue;
}
.dropdown-btn.secondary {
background: DarkGray;
}
.dropdown-btn.secondary:hover {
background: LightGray;
}
.dropdown-list {
position: absolute;
top: 108%;
overflow: hidden;
transition: max-height 0.5s linear;
}
.dropdown-list.shown {
max-height: 420px;
}
.dropdown-list.hidden {
max-height: 0;
}
.dropdown-list > a {
display: block;
min-width: 255px;
max-width: 335px;
padding: 15px 25px;
color: White;
background: RoyalBlue;
border-bottom: 1px solid DodgerBlue;
text-decoration: none;
}
.dropdown-list > a:hover {
background: DodgerBlue;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment