CSS-溢出允许水平滚动 [英] css - overflow allow horizontal scroll

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

问题描述

有关溢出的快速问题.我正在此页面上

Quick question about overflows. I'm working on this page

http://www4.wittenberg.edu/admission_dev/undergrad/,我我试图让溢出允许水平滚动.我尝试将body设置为hidden,将"real body"类设置为auto.这似乎不起作用.任何帮助将不胜感激!

http://www4.wittenberg.edu/admission_dev/undergrad/ and I'm trying to get the overflow to allow for horizontal scrolls. I've tried setting the body to hidden and the class "real body" to auto. This doesn't seem to work. Any help would be appreciated!

推荐答案

您需要用position: relative; overflow: auto div包装长内容div.

you need to wrap your long content div with a position: relative; overflow: auto div.

我是这样的:

.wrapper {
  position: relative;
  overflow: auto;
}

.content {
  position: absolute;
  width: 30000px;
}

有关更好的示例,请检查 http://jsfiddle.net/wXqPv/

for a better example, please check http://jsfiddle.net/wXqPv/

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

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