<template>
<div class="contain">
<el-scrollbar style="height: 100%;">
<p v-for="item in 100" :key="item">afsafs</p>
</el-scrollbar>
</div>
</template>
<script>
export default {
data() {
return {
msg: 'hello'
}
}
}
</script>
<style lang="scss" scoped>
.contain {
width: 500px;
height: 500px;
background-color: pink;
/* overflow: auto; */
.el-scrollbar__wrap{
overflow-x: hidden;
}
::v-deep{
.el-scrollbar__thumb{
background-color: gold !important;
}
}
}
</style>
.el-scrollbar__thumb就是控制滚动条的样式
取消x轴坐标