css实现步进移动式菜单效果代码
代码语言:html
所属分类:菜单导航
代码描述:css实现步进移动式菜单效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<html>
<head>
<style>
/* variables */
/* Reset */
*, *::after, *::before {
margin: 0;
padding: 0;
box-sizing: border-box;
}
/* Generic */
body {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100vh;
font-family: 'Poppins', sans-serif;
font-size: 11px;
letter-spacing: 1px;
background: #F0EDFD;
color: #FFFFFF;
user-select: none;
}
/**/
.main {
display: flex;
flex-direction: column;
width: 300px;
height: auto;
padding: 10px;
background: #7B49DD;
border-radius: 30px;
box-shadow: 0 0 40px 5px rgba(123, 73, 221, 0.25);
}
.bar {
display: flex;
justify-content: space-between;
align-items: center;
flex-shrink: 0;
width: 100%;
height: 50px;
padding: 10px 0px;
margin-bottom: 10px;
}
.bar__icon {
width: 40px;
height: 40px;
object-fit: contain;
padding: 10px;
background: #6b34d9;
border-radius: 50%;
}
.menu {
display: flex;
flex-wrap: wrap;
width: 100%;
height: 420px;
position: relative;
}
.menu__item {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
position: relative;
width: 140px;
height: 140px;
cursor: pointer;
background: transparent;
z-index: 100;
transition: 150ms;
}
.menu__item:hover .menu__icon {
animation: icon .1s 4;
}
.menu__item:hover .menu__span {
transform: translateY(-17px);
transition: 300ms;
}
.menu__icon {
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0