我怎样才能使模式弹出滚动它与页面内容? [英] How can I make the modal popup scroll its contents with the page?

查看:126
本文介绍了我怎样才能使模式弹出滚动它与页面内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个模式弹出,并在加载时是不是浏览器的高度我无法向下滚动查看信息的其余部分更高的内容。相反,背景可以滚动,但弹出不会。

I've got a modal popup and when it loads contents that are taller than the browser height I am unable to scroll down to view the rest of the information. Instead the background can scroll but the popup won't.

相反,我想有弹出原地不动,当用户滚动向上或向下它留在原地弹出,让他们滚动到内容的底部。如果你犯了一个超级长的帖子在Facebook上弹出正常工作,我想知道我如何能得到与此控件同样的效果。

Instead I'd like to have the popup stay put and when the user scrolls up or down it leave the popup in place and let them scroll to the bottom of the contents. If you make a super long post on Facebook the popup works correctly and I'd like to know how I can get this same effect with this control.

推荐答案

在你的模式弹出的CSS,设置modalpop了宽度,然后设置溢出:汽车。这会给你水平滚动条。例如:

In the css of your modal popup, set the width of the modalpop up, then set the overflow:auto. That will give you horizontal scrollbar. Example:

.ModalPopupPanel
{
  width:900px;
  overflow:auto;
}

所以,当内容宽度超出900px,水平滚动条会显示出来。
这同样适用于你需要设置modalpop的高度垂直滚动条正确的。

So,when the content width exceed the 900px, the horizontal scrollbar will show up. The same is true for the vertical scrollbar where you need to set the height of the modalpop.

这篇关于我怎样才能使模式弹出滚动它与页面内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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