less代码
* {
margin: 0;
padding: 0;
}
.box {
width: 100vw;
height: 100vh;
background: red;
.scroll {
width: 100vw;
height: 100vh;
display: flex;
// 右边列表
.scroll-right {
width: 25vw;
background: aqua;
font-size: 28px;
height: 100vh;
overflow-y: auto;
.right-item {
width: 25vw;
height: 80px;
text-align: center;
line-height: 80px;
border-bottom: 1px solid #ccc;
}
.active {
height: 80px;
text-align: center;
line-height: 80px;
background: #0f0;
}
}
// 左边内容
.scroll-left {
width: 75vw;
height: 100vh;
overflow-y: auto;
//滚动的更加丝滑
scroll-behavior: smooth;
.left-item {
width: 75vw;
font-size: 30px;
text-align: center;
.item-title {
height: 30px;
background: #ccc;
}
}
}
}
}