旋转导航菜单效果
代码语言:html
所属分类:菜单导航
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title> - Rotated Nav Animation - #043 of #100Days100Projects</title>
<link rel='stylesheet' href='http://repo.bfw.wiki/bfwrepo/css/font-awesome-4.7.0/css/font-awesome.min.css'>
<style>
@import url('https://fonts.googleapis.com/css?family=Muli&display=swap');
@import url('https://fonts.googleapis.com/css?family=Lato&display=swap');
* {
box-sizing: border-box;
}
body {
background-color: #333;
color: #222;
font-family: 'Lato', sans-serif;
margin: 0;
}
.container {
background-color: #fafafa;
transform-origin: top left;
transition: transform 0.5s linear;
padding: 50px;
width: 100vw;
min-height: 100vh;
}
.circle-container {
position: fixed;
top: -100px;
left: -100px;
}
.container.show-nav {
transform: rotate(-20deg);
}
.circle {
background-color: #ff7979;
border-radius: 50%;
position: relative;
height: 200px;
width: 200px;
transition: transform 0.5s linear;
}
.container.show-nav .circle {
transform: rotate(-70deg);
}
.circle button {
background: transparent;
border: 0;
color: #fff;
font-size: 26px;
position: absolute;
top: 50%;
left: 50%;
height: 100px;
}
.circle button:focus {
outline: none;
}
.circle button#open {
left: 60%;
}
.circle button#close {
top: 60%;
transform: rotate(90deg);
transform-origin: top left;
}
nav {
color: #fff;
position: fixed;
bottom: 40px;
left: 0;
z-index: 100;
}
nav ul {
list-style-type: none;
padding-left: 30px;
}
nav ul li {
margin: 40px 0;
text-transform: uppercase;
transform: translateX.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0