当光标位于 iFrame 区域 (Firefox) 上时不滚动



>我有一个居中的iframe的网站,它有一个固定的高度和宽度。因此,您无法在 iframe 内滚动,但可以滚动整个侧面。

问题:当我想滚动整个侧面,但我将鼠标放在 iframe 区域上时,它不起作用。我必须将鼠标移到一边,这样它就不会再在 iframe 上了。我只在火狐中遇到这个问题。

iFrame的CSS,正文滚动是标准的:

.frame{
    width:1024px;
    height:768px;
    top:50%;
    margin-top:-384px;
    border:0;
    z-index:1;
    overflow:hidden;
    position:absolute;
}

删除 CSS overflow属性。

.frame{
    width: 1024px;
    height: 768px;
    top: 50%;
    margin-top: -384px;
    border: 0;
    z-index: 1;
    overflow: scroll; /* not necessary */
    position: absolute;
}

最新更新