gpt4 book ai didi

asp.net - 在 html 和 css 中隐藏水平滚动条?

转载 作者:行者123 更新时间:2023-11-28 14:11:21 25 4
gpt4 key购买 nike

我试图隐藏网页上的水平滚动条。我试过使用“overflow-x:hidden”,但 Visual Studio 说 overflow-x 不是已知的 CSS 属性名称。

我还使用 overflow:auto 来处理垂直滚动条而不是水平滚动条。

帮忙吗?

最佳答案

溢出属性是真实的,在此处的 CSS3 草案中:

W3C CSS3 Box Model Page

overflow:auto 只会在内容适合 时隐藏滚动条,即如果内容在 Y 维度上比父容器短,它会隐藏垂直滚动条。此页面上的一些插图比我能更好地解释它!

http://www.brunildo.org/test/Overflowxy2.html

关于asp.net - 在 html 和 css 中隐藏水平滚动条?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9437921/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com