0

我想在我的网站最小化时显示一个水平滚动条,并在全窗口时隐藏它。请帮忙。丹尼斯

4

3 回答 3

2

用这个:

body {
    overflow-x: auto;
    overflow-y: hidden;
}
于 2012-05-17T10:20:21.723 回答
0

在 style.css 中使用它

 body
    {
    overflow-x:scroll;
    }
于 2012-05-17T10:19:28.790 回答
0

试过这个: -

style="overflow-y:hidden;overflow-x:scroll

转到此网址将对您有所帮助:- http://www.quackit.com/html/codes/horizo​​ntal_scroll.cfm

尝试运行此代码:-

<div style="border:1px solid black;width:200px;height:100px;overflow-y:hidden;overflow-x:scroll;">
<p style="width:250%;">
By using overflow-x, we can create scroll bars when the contents of this div are wider than the container. By setting this paragraph to 250 percent, it is 250 percent wider than the parent container - forcing an overflow. 
</p>
</div>
<p style="font-size:10px;"><a href="#">Create blog</a></p>
于 2012-05-17T10:20:56.903 回答