css+svg实现底部tab导航条切换选项卡显示卡片列表数据效果代码
代码语言:html
所属分类:选项卡
代码描述:css+svg实现底部tab导航条切换选项卡显示卡片列表数据效果代码
代码标签: css svg 底部 tab 导航条 切换 选项卡 显示 卡片 列表
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400&display=swap');
:root {
--icon: #fff;
--dark: #1e1f26;
--tran: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55) 0s;
--font: 'Lato', Arial, Helvetica, serif;
}
body {
width: 100vw;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
margin: 0;
font-family: var(--font);
background-color: #7f5a83;
background-image: linear-gradient(315deg, #7f5a83 0%, #0d324d 74%);
}
.content {
height: 350px;
display: flex;
justify-content: center;
align-items: center;
position: relative;
width: 350px;
background: linear-gradient(0deg, #fff6, #fff2, #fff2);
border-radius: 5px;
max-height: 96vh;
}
nav.bar {
display: flex;
justify-content: center;
align-items: flex-end;
width: calc(100% - 30px);
height: 65px;
bottom: 10px;
position: absolute;
}
nav.bar:before,
nav.bar:after {
content: "";
width: 6px;
height: 65px;
background: var(--dark);
position: absolute;
left: -5px;
bottom: 0;
border-radius: 5px 0 0 5px;
}
nav.bar:after {
left: inherit;
right: -5px;
border-radius: 0 5px 5px 0;
}
input { display: none; }
label {
text-decoration: none;
text-transform: uppercase;
font-size: 10px;
width: 50px;
height: 50px;
text-align: center;
display: inline-grid;
color: var(--dark);
position: relative;
transition: var(--tran);
cursor: pointer;
align-items: end;
background-repeat: no-repeat;
background-size: 25px 25px;
background-position: 12px 10px;
bottom: 7px;
margin: 0 10px;
z-index: 4;
}
label:hover {
color: #fff;
height: 55px;
}
input:checked + label {
height: 70px;
padding-bottom: 10px;
}
.selector {
width: 100%;
height: 90px;
position: absolute;
bottom: 0;
left: 0;
z-index: 0;
transition: var(--tran);
overflow: hidden;
}
.selector:before {
content: "";
background:
radial-gradient(circle at 50% 0%, #fff0 25px, var(--dark) 26px 100%),
radial-gradient(circle at 50% 25px, var(--dark) 0 20px, #fff0 21px 100%),
radial-gradient(circle at calc(50% + 0px) 23px, #0009 15px, #fff0 23px 100%),
radial-gradient(circle at calc(50% - 0px) 30px, #fff8 15px, #fff0 23px 100%);
width: 200%;
height: 100%;
position: absolute;
bottom: 0;
left: 0;
z-index: -1;
transition: all 0.5s .........完整代码请登录后点击上方下载按钮下载查看
















网友评论0