代码拉取完成,页面将自动刷新
:root {
--color: #222327
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: var(--color);
}
.container {
width: 440px;
height: 70px;
background: #fff;
display: flex;
justify-content: center;
align-items: center;
border-radius: 10px;
position: relative;
}
.item {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
width: 100px;
}
.icon {
position: absolute;
font-size: 1.7em;
color: var(--color);
font-weight: bold;
transition: 0.5s;
}
.text {
transform: translateY(20px);
font-size: 0.75em;
font-weight: bold;
transition: 0.5s;
opacity: 0;
}
.item.active .icon {
transform: translateY(-32px);
z-index: 1;
}
.item.active .text {
opacity: 1;
transform: translateY(10px);
}
.indicator{
position: absolute;
width: 70px;
height: 70px;
background: #29fd53;
left: 35px;
top: -50%;
border-radius: 50%;
border: 6px solid var(--color);
transition: 0.5s;
}
.indicator::before{
content: '';
position: absolute;
top: 50%;
left: -22px;
width: 20px;
height: 20px;
background: transparent;
border-top-right-radius: 20px;
box-shadow: 0 -10px 0 0 var(--color);
}
.indicator::after{
content: '';
position: absolute;
top: 50%;
right: -22px;
width: 20px;
height: 20px;
background: transparent;
border-top-left-radius: 20px;
box-shadow: 0 -10px 0 0 var(--color);
}
.item:nth-child(1).active ~ .indicator{
transform: translateX(calc(100px * 0));
}
.item:nth-child(2).active ~ .indicator{
transform: translateX(calc(100px * 1));
}
.item:nth-child(3).active ~ .indicator{
transform: translateX(calc(100px * 2));
}
.item:nth-child(4).active ~ .indicator{
transform: translateX(calc(100px * 3));
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。