gpt4 book ai didi

css 溢出-x :auto to show only when width less than certain amount

转载 作者:搜寻专家 更新时间:2023-10-31 08:22:07 25 4
gpt4 key购买 nike

我的 <html style="overflow-x:hidden; overflow-y:hidden

里面有一个带有 overflow-x:auto 的 div;溢出-y:滚动;最小宽度:960px;但是当我的浏览器查看模式大于 960px 时,它仍然显示水平滚动条。如何让水平滚动条只在宽度小于 960 时才显示?

最佳答案

你所要做的就是

<html style="overflow-x:auto; overflow-y:auto>

但是当overflow-y设置为scroll时会更漂亮;

还有

overflow-x:auto; overflow-y:scroll;

应该应用于 html 标签或 :root。只有在那种情况下它们才会起作用。

关于css 溢出-x :auto to show only when width less than certain amount,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3486203/

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