svg+css实现伸缩式fab菜单栏交互效果代码
代码语言:html
所属分类:菜单导航
代码描述:svg+css实现伸缩式fab菜单栏交互效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&display=swap" rel="stylesheet">
<style>
* {
transition: 500ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
font-family: "Space Mono", monospace;
}
body {
height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background-color: #fcdee3;
}
#shape {
width: 26rem;
height: 7rem;
position: relative;
overflow: hidden;
border-radius: 2rem;
display: flex;
flex-direction: row;
justify-content: space-between;
filter: drop-shadow(0 0 1rem #00000022);
}
#shape:hover::before {
perspective: 100px;
}
#shape:before {
content: "";
position: absolute;
top: -50%;
right: calc(50% - 3.5rem);
width: 7rem;
height: 7rem;
border-radius: 50%;
background-color: transparent;
box-shadow: 10px -10px 5px 300px #ffffff;
z-index: -1;
}
.bar_wrapper {
position: relative;
}
.icon {
color: #fcdee3;
padding: 2rem;
margin-left: 0.5rem;
margin-right: 0.5rem;
}
.fab {
position: absolute;
bottom: 0;
left: calc(50% - 3rem);
width: 6rem;
height: 6rem;
margin-bottom: 4rem;
back.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0