CSS - 仅使用水平滚动条 [英] CSS - use a horizontal scrollbar only

查看:150
本文介绍了CSS - 仅使用水平滚动条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



因此,我需要使用横向scollbar,因为我写的是:

  .viewgallerylist {width:920px; float:left; padding-top:20px; height:120px; border-bottom:1px#000000 solid; overflow-x:scroll;} 

问题是滚动条是2,1水平和1垂直。如何删除垂直的?欢呼

解决方案

  .viewgallerylist {
min-width:920px;
overflow:hidden;
-ms-overflow-x:auto; / * IE8 * /
overflow-x:auto;
}

(min-width在IE6中不起作用,支持恐龙)


i need to use an horizontal scollbar only if the content of the div is longer than the width value.

so i write :

.viewgallerylist{width:920px; float:left; padding-top:20px; height:120px; border-bottom:1px #000000 solid; overflow-x: scroll;}

the problem is that the scrollbar are 2, 1 horizontal and 1 vertical. How to remove the vertical one? cheers

解决方案

.viewgallerylist {
    min-width: 920px;
    overflow: hidden;
    -ms-overflow-x: auto; /* IE8 */
    overflow-x: auto;
}

(min-width doesn't work in IE6, in case you still want to support that dinosaur)

这篇关于CSS - 仅使用水平滚动条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆