我的网页不会让我滚动? [英] My webpage won't let me scroll?

查看:98
本文介绍了我的网页不会让我滚动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在制作一个网页,其中有一个div(容器),它是div舍入的父级。出于某种奇怪的原因,即使两个div的高度都大于屏幕,网页也不会让我向下滚动。

I'm making a webpage where I have a div ("container") that is a parent to the div "rounded". For some odd reason, the webpage doesn't let me scroll down even though both of the divs' height are larger than the screen.

下面是一个带有组件的jFiddle没有解决: http://jsfiddle.net/pmg92/19/

Here's a jFiddle with the components that aren't working out: http://jsfiddle.net/pmg92/19/

任何想法为什么这是行不通的?

Any ideas as to why this isn't working?

推荐答案

您需要将位置:fixed .container 关闭,以使页面可以滚动

You need to take the position:fixed off the .container so that it allows the page to be scrollable

编辑

检查此处 http://jsfiddle.net/pmg92/23/ 我想这就是你要找的。我拿出了不相关的CSS,所以不要复制粘贴到你的。我取消了使用 border-radius 的背景圆形图像,因为通过使用背景图像,您无法根据内容真正收缩或展开图像。这不适用于旧版浏览器,除非您使用webkit等。

Check this out here http://jsfiddle.net/pmg92/23/ I think this is what you are looking for. I took out the non relevant css so don't just copy and paste to yours. I eliminated your background rounded image in place of using border-radius because by using a background image you can't really shrink or expand depending on content. This won't work on older browsers unless you use webkits and so on.

如果你想使用图片,我会建议在顶部,底部和中间切片。顶部将包含具有半径的顶部部分。中间高1px,根据需要重复垂直。底部将包含半径的底部。

If you want to use an image I would suggest slicing the image between a top, bottom, and middle. The top would contain the top section with the radii. The middle would be 1px tall that repeats vertical as needed. The bottom would contain the bottom section with the radii.

这篇关于我的网页不会让我滚动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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