有没有办法在使用overflow-x:auto时在我的表和滚动条之间放置一个空格;"

 岁月完好 发布于 2023-02-12 09:48

我有一个这样的简单表格:

... ...
#table-overflow { position: absolute; top: 10rem; right: 3rem; left: 3rem; bottom: 2rem; display: block; overflow-x: auto; }

当有许多行和列时,滚动条会按预期显示.当宽度超过表格时,我会在右侧看到一个垂直滚动条,表格数据会一直向上滚动到此滚动条.有没有什么方法我可以在垂直滚动条的左边有一个空格,在水平滚动条上面有一个空格而不使用jQuery滚动条插件?

我希望看到的是这样的:

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx v
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx v
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx v
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx v

hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

其中v是垂直滚动条,h是水平滚动条,x是数据

撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有