
/中,如何制作圆角栏目的选项卡效果?
你想要创建一个圆角栏目的选项卡效果,其中一个选中的选项是用白色文本填充蓝色背景,而其他选项是黑色文本填充灰色背景。
以下是使用html和实现此效果的方法:
<div class="tabs">
<div class="tab active">日</div>
<div class="tab">周</div>
<div class="tab">月</div>
<div class="tab">年</div>
</div>
登录后复制
.tabs {
display: flex;
justify-content: space-between;
flex-direction: row;
background-color: #E1E1E1;
border-radius: 82px;
height: 82px;
}
.tab {
font-size: 36px;
color: rgba(69, 69, 68, 1);
width: 100%;
text-align: center;
line-height: 82px;
}
.tab.active {
color: rgba(255, 255, 255, 1);
background-color: #31BDEC;
border-radius: 82px;
}
登录后复制
效果展示:
立即学习“”;
[图片]
以上就是Vue/UniApp中如何制作圆角选项卡,且选中状态颜色与未选中状态颜色不同?的详细内容,更多请关注米云其它相关文章!
