纯css实现加号弹出导航菜单效果
代码语言:html
所属分类:菜单导航
代码描述:纯css实现加号弹出导航菜单效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Montserrat&display=swap"rel="stylesheet'>
<style>
:root {
--icon-size: 28px;
--background-color: rgb(204, 220, 255);
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
width: 100%;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: var(--background-color);
overflow: hidden;
}
nav {
min-width: 300px;
height: 90px;
border-radius: 30px;
box-shadow: 0 5px 6px rgba(0, 0, 0, 0.01), 0 12px 10px rgba(0, 0, 0, 0.01), 0 30px 25px rgba(0, 0, 0, 0.012), 0 100px 80px rgba(0, 0, 0, 0.02);
}
nav ul {
width: 100%;
height: 100%;
display: flex;
}
nav ul li {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
list-style: none;
background: white;
}
nav ul li.left {
padding-left: 10px;
border-top-left-radius: 30px;
border-bottom-left-radius: 30px;
border-top-right-radius: 10px;
}
nav ul li.right {
padding-right: 10px;
border-top-right-radius: 30px;
border-bottom-right-radius: 30px;
border-top-left-radius: 10px;
}
nav .icon {
height: var(--icon-size);
width: var(--icon-size);
cursor: pointer;
}
nav .icon svg {
height: var(--icon-size);
width: var(--icon-size);
fill: var(--background-color);
}
nav button {
--size: 75px;
border: none;
background: none;
position: relative;
width: var(--size);
height: var(--size);
display: flex;
margin-bottom: 100px;
}
nav button span {
width: var(--size);
height: var(--size);
border-radius: 50px;
background: #75a0ff;
box-shadow: 0 0 0 12p.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0