CSS 文字超出显示滚动条

1、布局结构

html 复制代码
<view class="tes" style="margin-top: 15rpx;">
	<p v-html="conten" class="conten"></p>
</view>

conten 里是内容

2、页面样式

css 复制代码
	.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;
	}

可以通过改变css 中的颜色,判断代码都是负责哪一部分

相关推荐
Watermelo6174 分钟前
【前端实战】从 try-catch 回调到链式调用:一种更优雅的 async/await 错误处理方案
前端·javascript·网络·vue.js·算法·vue·用户体验
木易 士心5 分钟前
NestJS 核心揭秘:InstanceWrapper 的艺术与前端缓存新思路
前端·缓存
IT_陈寒8 分钟前
SpringBoot 3.x性能优化实战:这5个配置让你的应用启动速度提升50%
前端·人工智能·后端
奶昔不会射手9 分钟前
css之如何获取祖先元素的宽高
前端·css
serve the people10 分钟前
滑块验证完整实现教程(前端 + 后端 + Nginx 集成)
运维·前端·nginx
yivifu11 分钟前
Excel中Lookup函数实现临界点归入下一个等级的方法
java·前端·excel
Wiktok12 分钟前
Tailwind CSS 自适应相关
前端·css·tailwindcss
LYFlied13 分钟前
【一句话概括】Vue2 和 Vue3 的 diff 算法区别
前端·vue.js·算法·diff
亮子AI17 分钟前
Chrome 和 Edge 生成的 fingerprint 是一样的?
前端·chrome·edge
狼性书生17 分钟前
uniapp实现的时间范围选择器组件
前端·uni-app·vue·组件·插件