-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 2667116
Showing
2 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<link rel="stylesheet" href="main.css" type="text/css" /> | ||
<title>Document</title> | ||
</head> | ||
<body> | ||
<nav class="navDefault"> | ||
<div class="dropdown"> | ||
<button>Dropdown</button> | ||
<ul class="dropdownMenu"> | ||
<li class="dropdownItem"><a href="#" class="dropdownLink">Link</a></li> | ||
<li class="dropdownItem"><a href="#" class="dropdownLink">Link</a></li> | ||
<li class="dropdownItem"><a href="#" class="dropdownLink">Link</a></li> | ||
<li class="dropdownItem"><a href="#" class="dropdownLink">Link</a></li> | ||
</ul> | ||
</div> | ||
</nav> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
.navDefault { | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
right: 0; | ||
background-color: #4a4a4f; | ||
} | ||
|
||
button { | ||
border: none; | ||
background-color: #0997d3; | ||
width: 150px; | ||
height: 50px; | ||
color: #fff; | ||
text-transform: uppercase; | ||
cursor: pointer; | ||
} | ||
|
||
.dropdownMenu{ | ||
list-style: none; | ||
margin:0; | ||
padding: 0; | ||
position: absolute; | ||
left: 0; | ||
right: 0; | ||
top: 50px; | ||
z-index: -1; | ||
width: 150px; | ||
text-align: center; | ||
transform: translateY(-100%); | ||
transition: transform 0.5s ease-in-out; | ||
} | ||
|
||
.dropdownLink { | ||
text-decoration: none; | ||
display: block; | ||
background-color: #f9f9f9; | ||
color: #4a4a4f; | ||
padding: 10px 5px; | ||
transition: background-color .5s ease-in-out, color .5s ease-in-out; | ||
} | ||
|
||
.dropdownLink:hover { | ||
color: #fff; | ||
background-color: #a0a0a3; | ||
} | ||
|
||
.dropdown { | ||
width: 150px; | ||
position: relative; | ||
} | ||
|
||
.dropdown:hover button { | ||
background-color: #018ec5; | ||
} | ||
|
||
.dropdown:hover .dropdownMenu { | ||
transform: translateY(0); | ||
box-shadow: 0px 6px 10px 0px rgba(0, 0, 0, 0.2); | ||
} |