A vertical scroll bar and the three factors of the scroll bar style modified
Explain the
hidden-ovflow-box is generated scroll bar area
.teacherstudent-page .hidden-ovflow-box{
height: calc(100% - 179px);
overflow: hidden;
overflow-y: auto;
}
It produces three essential elements of the scroll bar
Precautions == "If you no scroll bar, move the scroll bar area give you set a fixed height.
For example, a fixed height is 1000px; if produced a scroll bar.
Description is height: calc (100% - 179px ); this a problem.
Today I met. At this point you go step by step to check hidden-ovflow-box of the parent element is set high 100%
Another point
height: calc (100% - 179px ); this dynamically calculated height must be accurate.
Whether the person with the next element of the same level will be problems.
The question is: scroll bar area inside the element level higher than the scroll bar elements outside the region.
html
<div class="hidden-ovflow-box">
<div
:class="{infolistmoduleactive:currentIndex==index}"
class="info-list-module"
@click="handlerCurrentPerson(index,item)"
v-for="(item,index) in leftListData"
:key="index"
>
</div>
</div>
css
.teacherstudent-page .hidden-ovflow-box{
height: calc(100% - 179px);
overflow: hidden;
overflow-y: auto;
}
/* 滚动条样式开始 */
.teacherstudent-page .hidden-ovflow-box::-webkit-scrollbar {
/*滚动条整体样式*/
width: 10px; /*修改滚动条的宽度*/
/*高宽分别对应横竖滚动条的尺寸*/
height: 4px;
}
.teacherstudent-page .hidden-ovflow-box::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/
border-radius: 5px;
background: #cccccc;
}
.teacherstudent-page .hidden-ovflow-box::-webkit-scrollbar-track {
/*滚动条里面轨道*/
border-radius: 0;
background: #e5e7ef;
}