赞
踩
1.出现如上情况,用element-ui同样也可以实现;
2.实现难度在于,用css画出来的三角可以实现,三十由于父盒子宽度不够,会被默认隐藏,此时我们需要抬高下划线和三角形,如何用伪类让后面的线也抬高;代码如下:
::v-deep .thing-tab {
.is-stretch {
display: flex;
min-width: 1024px;
}
.el-tabs__item {
width: 200px;
height: 125px;
padding: 30px 45px 28px 50px;
color: #298ee8;
font-weight: 500;
font-size: 42px;
font-family: Alibaba-PuHuiTi-Medium, sans-serif;
text-align: center;
}
.el-tabs__active-bar {
top: 96px;
width: 254px !important;
background-color: #298ee8;
&::after {
position: absolute;
top: 2px;
left: 118px;
width: 0;
height: 0;
border-top: 20px solid rgba(41, 142, 232, 1);
border-right: 20px solid transparent;
border-bottom: 0 solid transparent;
border-left: 20px solid transparent;
content: '';
}
}
.is-active {
color: #298ee8;
}
.el-tabs__nav-wrap::after {
position: absolute;
bottom: 25px;
left: 0;
// display: none;
width: 100%;
height: 2px;
background-color: #333;
content: "";
z-index: 1;
}
}
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。