悬浮菜单弹出动画效果
代码语言:html
所属分类:菜单导航
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title> - Mobile Menu</title>
<style>
:root {
--blue: #008EFA;
--pink: #FF207A;
--bg: #EEEEEE;
--white: #FEFEFE;
}
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
body {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100vh;
background-color: var(--bg);
}
.main {
display: flex;
justify-content: center;
align-items: flex-end;
width: 300px;
height: 200px;
position: relative;
}
.menu {
display: flex;
justify-content: space-between;
align-items: center;
width: 300px;
height: 100px;
padding: 30px;
border-radius: 5px;
box-shadow: 0 0 5px 1px rgba(0,0,0,.05);
background-color: var(--white);
}
.menu__trigger {
position: absolute;
top: 50px;
left: calc(50% - 50px);
width: 100px;
height: 100px;
background-color: var(--blue);
border: 10px solid var(--bg);
border-radius: 50%;
padding: 20px;
cursor: pointer;
transition: .35s ease;
}
.menu__base {
width: 20px;
height: 20px;
object-fit: contain;
opacity: .7;
}
.menu__item {
position: absolute;
width: 60px;
height: 60px;
to.........完整代码请登录后点击上方下载按钮下载查看
网友评论0