Skip to content

Commit

Permalink
Initiial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
loosenthedark committed Oct 10, 2019
0 parents commit 2667116
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 0 deletions.
23 changes: 23 additions & 0 deletions index.html
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>
60 changes: 60 additions & 0 deletions main.css
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);
}

0 comments on commit 2667116

Please sign in to comment.