Add files via upload
This commit is contained in:
parent
7b0d045645
commit
3b2d267b50
100
100_projects/25-dropdown-menu/css/style.css
Normal file
100
100_projects/25-dropdown-menu/css/style.css
Normal file
@ -0,0 +1,100 @@
|
||||
*{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
body{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
min-height: 100vh;
|
||||
background: linear-gradient(60deg, #BDB76B, #8FBC8F);
|
||||
}
|
||||
.menu{
|
||||
position: relative;
|
||||
width: 320px;
|
||||
height: 120px;
|
||||
background: linear-gradient(45deg, #F8F8FF, #E6E6FA);
|
||||
box-shadow: 0 30px 30px rgba(0,0,0,.1);
|
||||
padding: 20px;
|
||||
overflow: hidden;
|
||||
transition: height .5s ease-in-out;
|
||||
}
|
||||
|
||||
.menu.active{
|
||||
height: 400px;
|
||||
}
|
||||
.menu .content{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.menu .content .img{
|
||||
position: relative;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
border-radius: 50%;
|
||||
overflow: hidden;
|
||||
}
|
||||
.menu .content .img img{
|
||||
position: relative;
|
||||
top:0;
|
||||
left:0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
.menu .content h2{
|
||||
margin-left: 15px;
|
||||
font-size: 18px;
|
||||
color: #555;
|
||||
}
|
||||
.menu .content h2 span{
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #BDB76B;
|
||||
}
|
||||
.navigation{
|
||||
position: relative;
|
||||
top:25px;
|
||||
border-top: 1px solid rgba(0,0,0,.1);
|
||||
padding: 20px 0;
|
||||
}
|
||||
.navigation li{
|
||||
list-style: none;
|
||||
margin: 15px 0 ;
|
||||
}
|
||||
.navigation li a{
|
||||
text-decoration: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #555;
|
||||
font-size: 16px;
|
||||
transition: .25s;
|
||||
}
|
||||
.navigation li a:hover{
|
||||
color: #BDB76B;
|
||||
}
|
||||
.navigation li a ion-icon{
|
||||
font-size: 19px;
|
||||
margin-right: 15px;
|
||||
}
|
||||
.toggle{
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
background: #BDB76B;
|
||||
color: #E6E6FA;
|
||||
font-size: 18px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
.menu .toggle ion-icon{
|
||||
transition: transform, ease-in-out .5s;
|
||||
}
|
||||
.menu.active .toggle ion-icon{
|
||||
transform: rotate(-180deg);
|
||||
}
|
63
100_projects/25-dropdown-menu/index.html
Normal file
63
100_projects/25-dropdown-menu/index.html
Normal file
@ -0,0 +1,63 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="menu">
|
||||
<div class="content">
|
||||
<div class="img">
|
||||
<img src="user.jpg">
|
||||
</div>
|
||||
<h2>Someone Famous <br> <span>Website Designer</span></h2>
|
||||
</div>
|
||||
<ul class="navigation">
|
||||
<li>
|
||||
<a href="#">
|
||||
<ion-icon name="people-outline"></ion-icon>
|
||||
Edit Profile
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">
|
||||
<ion-icon name="mail-outline"></ion-icon>
|
||||
Inbox
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">
|
||||
<ion-icon name="cog-outline"></ion-icon>
|
||||
Settings
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">
|
||||
<ion-icon name="information-circle-outline"></ion-icon>
|
||||
Support
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">
|
||||
<ion-icon name="log-out-outline"></ion-icon>
|
||||
Logout
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="toggle">
|
||||
<ion-icon name="chevron-down-outline"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="module" src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.esm.js"></script>
|
||||
<script nomodule src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.js"></script>
|
||||
<script src="js/main.js">
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
6
100_projects/25-dropdown-menu/js/main.js
Normal file
6
100_projects/25-dropdown-menu/js/main.js
Normal file
@ -0,0 +1,6 @@
|
||||
let menu = document.querySelector(".menu");
|
||||
let menuToggle = document.querySelector(".toggle");
|
||||
menuToggle.onclick = function(){
|
||||
menu.classList.toggle('active');
|
||||
}
|
||||
|
BIN
100_projects/25-dropdown-menu/user.jpg
Normal file
BIN
100_projects/25-dropdown-menu/user.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 115 KiB |
Loading…
Reference in New Issue
Block a user