繁体   English   中英

到目前为止,Overflow X问题在Firefox上不起作用,但在IE和Chrome上仍然有效

[英]Overflow X issue not working on Firefox but does on IE and Chrome so far

这是代码:Firefox中的问题是滚动条在X方向上没有限制。

请在Chrome和Firefox中打开代码,以查看滚动条中的区别,以更好地理解问题。

提前致谢!

<html>
<body>
    <div style="position: absolute; overflow-x: hidden; overflow-y: hidden; left: 0px; top: 0px; right: 0px; bottom: 0px; height:180px;">
        <div style="position: absolute; left:0px; right:0px; top:0px; bottom:0px; overflow:auto; ">
            <div style="width:40000px">
                <div style="width:150px; height:150px; background-color:blue; margin:4px; float:left" > </div>
                <div style="width:150px; height:150px; background-color:blue; margin:4px; float:left" > </div>
                <div style="width:150px; height:150px; background-color:blue; margin:4px; float:left" > </div>
                <div style="width:150px; height:150px; background-color:blue; margin:4px; float:left" > </div>
                <div style="width:150px; height:150px; background-color:blue; margin:4px; float:left" > </div>
                <div style="width:150px; height:150px; background-color:blue; margin:4px; float:left" > </div>
                <div style="width:150px; height:150px; background-color:blue; margin:4px; float:left" > </div>
                <div style="width:150px; height:150px; background-color:blue; margin:4px; float:left" > </div>
                <div style="width:150px; height:150px; background-color:blue; margin:4px; float:left" > </div>
                <div style="width:150px; height:150px; background-color:blue; margin:4px; float:left" > </div>
                <div style="width:150px; height:150px; background-color:blue; margin:4px; float:left" > </div>
                <div style="width:150px; height:150px; background-color:blue; margin:4px; float:left" > </div>
                <div style="width:150px; height:150px; background-color:blue; margin:4px; float:left" > </div>
                <div style="width:150px; height:150px; background-color:blue; margin:4px; float:left" > </div>
                <div style="width:150px; height:150px; background-color:blue; margin:4px; float:left" > </div>
                <div style="width:150px; height:150px; background-color:blue; margin:4px; float:left" > </div>
                <div style="width:150px; height:150px; background-color:blue; margin:4px; float:left" > </div>
                <div style="width:150px; height:150px; background-color:blue; margin:4px; float:left" > </div>
                <div style="width:150px; height:150px; background-color:blue; margin:4px; float:left" > </div>

            </div>
        </div>
    </div>
</body>
</html>

您的div中没有​​内容?

如果您希望它不包含任何内容,请尝试添加

display:block;

进入CSS :)

您在其中有一个宽度为40000px的div,因此Gecko允许您向右滚动40000px。 为什么不这样做呢? WebKit似乎不是WebKit错误的事实。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM