1、html
<view class="tes" style="margin-top: 15rpx;">
<p v-html="conten" class="conten"></p>
</view>
2、css
.tes {
height: 150rpx;
width: 98%;
padding-left: 55rpx;
padding-right: 44rpx;
margin: 0 auto;
overflow: scroll;
font-size: 30rpx;
line-height: 45rpx;
display: flex;
/* overflow:scroll; */
overflow: auto;
display: block;
letter-spacing: 3rpx;
box-sizing: border-box;
}
.tes::-webkit-scrollbar-track-piece {
background-color: rgba(0, 0, 0, 0);
border-left: 1px solid rgba(0, 0, 0, 0);
}
.tes::-webkit-scrollbar {
display: block;
width: 5px;
height: 10px;
-webkit-margin-bottom-collapse: 12px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
.tes::-webkit-scrollbar-thumb {
background-color: #b2b2b2;
background-clip: padding-box;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
min-height: 28px;
}
.tes::-webkit-scrollbar-thumb:hover {
background-color: #e6e6e6;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}