ElementUI 设置显示侧栏滚动条el-scrollbar,隐藏横向滚动条

el-scrollbar外的div一定要设置好高度,el-scrollbar样式设置为style="height: 100%"

HTML 代码

<div id="main">
    <el-scrollbar style="height: 100%" wrap-style="overflow-x:hidden;">
        <el-timeline :reverse="reverse" style="margin-top: 10px">
            <el-timeline-item
                v-for="(activity, index) in activities"
                :key="index"
                :color="activity.color"
                :timestamp="activity.timestamp"
            >
                {{ activity.content }}
            </el-timeline-item>
        </el-timeline>
    </el-scrollbar>
</div>

CSS代码

#main {
    height: calc(100vh - 320px);
    border-style: dashed;
}
上一篇:Java全栈(四)web网页技术:12.EL表达式


下一篇:FFmpeg中AVFilter模块实践指南