Add files via upload
This commit is contained in:
parent
14f50d9876
commit
10716672a9
@ -0,0 +1,71 @@
|
||||
*{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
body{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
min-height: 100vh;
|
||||
background: linear-gradient(45deg, #D2691E, #5F9EA0);
|
||||
}
|
||||
.menu{
|
||||
position: relative;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.menu li{
|
||||
position: absolute;
|
||||
left: 0;
|
||||
list-style: none;
|
||||
transform-origin: 100px;
|
||||
transition: .5s;
|
||||
transition-delay: calc(0.1s * var(--i));
|
||||
transform: rotate(0deg) translateX(80px);
|
||||
}
|
||||
.menu li a{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
background: #fff;
|
||||
border-radius: 50%;
|
||||
transform: rotate(0deg) / -8 * var(--i) ;
|
||||
font-size: 20px;
|
||||
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.15);
|
||||
color: #111;
|
||||
transition: .5s;
|
||||
}
|
||||
.menu li a:hover{
|
||||
color: #5F9EA0;
|
||||
}
|
||||
.menu.active li{
|
||||
transform: rotate(calc(360deg / 9 * var(--i)));
|
||||
}
|
||||
.toggle{
|
||||
position: absolute;
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
z-index: 99;
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
box-shadow: 0 3px 5px rgba(0, 0, 0, 0.15);
|
||||
font-size: 29px;
|
||||
transition: 1.25s;
|
||||
color: #5F9EA0;
|
||||
}
|
||||
.toggle:hover{
|
||||
color: #D2691E;
|
||||
}
|
||||
.menu.active .toggle{
|
||||
transform: rotate(315deg);
|
||||
}
|
49
100_projects/5-animated-circular-navigation-menu/index.html
Normal file
49
100_projects/5-animated-circular-navigation-menu/index.html
Normal file
@ -0,0 +1,49 @@
|
||||
<!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/all.css">
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="menu">
|
||||
<div class="toggle"><ion-icon name="add-outline"></ion-icon></div>
|
||||
<li style="--i:0";>
|
||||
<a href="#"><ion-icon name="home-outline"></ion-icon></a>
|
||||
</li>
|
||||
<li style="--i:1";>
|
||||
<a href="#"><ion-icon name="mail-outline"></ion-icon></a>
|
||||
</li>
|
||||
<li style="--i:2";>
|
||||
<a href="#"><ion-icon name="person-outline"></ion-icon></a>
|
||||
</li>
|
||||
<li style="--i:3";>
|
||||
<a href="#"><ion-icon name="videocam-outline"></ion-icon></a>
|
||||
</li>
|
||||
<li style="--i:4";>
|
||||
<a href="#"><ion-icon name="call-outline"></ion-icon></a>
|
||||
</li>
|
||||
<li style="--i:5";>
|
||||
<a href="#"><ion-icon name="navigate-outline"></ion-icon></a>
|
||||
</li>
|
||||
<li style="--i:6";>
|
||||
<a href="#"><ion-icon name="settings-outline"></ion-icon></a>
|
||||
</li>
|
||||
<li style="--i:7";>
|
||||
<a href="#"><ion-icon name="camera-outline"></ion-icon></a>
|
||||
</li>
|
||||
<li style="--i:8";>
|
||||
<a href="#"><ion-icon name="key-outline"></ion-icon></a>
|
||||
</li>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script src="js/main.js"></script>
|
||||
<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>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,5 @@
|
||||
let toggle = document.querySelector('.toggle');
|
||||
let menu = document.querySelector('.menu');
|
||||
toggle.onclick = function(){
|
||||
menu.classList.toggle('active');
|
||||
}
|
Loading…
Reference in New Issue
Block a user