简体   繁体   English

iframe没有以不同的分辨率显示

[英]iframe not showing up in different resolutions

I have an iFrame that I am using as the footer of my website. 我有一个iFrame用作网站的页脚。 The website has scrolling disabled. 该网站已禁用滚动。

I made the website on my laptop, but then when I try it on some older computer the footer doesnt show up. 我用笔记本电脑制作了该网站,但是当我在较旧的计算机上尝试该网站时,页脚不显示。 Again, the website has scrolling disabled so the iframe has to show up perfect. 同样,该网站已禁用滚动功能,因此iframe必须完美显示。

Right now I have the following CSS defined for this iframe: 现在,我为此iframe定义了以下CSS:

.footer { margin: 260px 0 0 90px; }

This margin places the iframe exactly where it needs to be on my 1360 X 768 Resolution laptop. 此余量将iframe准确放置在1360 X 768分辨率笔记本电脑上所需的位置。

What is the best way to do this. 做这个的最好方式是什么。 Using responsive or % instead of pixels? 使用响应式或%而非像素?

Your footer probably doesn't show up because you computer has another resolution and is therefore positioning it too low. 您的页脚可能没有显示,因为您的计算机具有其他分辨率,因此其位置过低。 Since it's not scrollable you can't reach it. 由于它不可滚动,因此无法达到它。
You could position the footer absolute. 您可以将页脚放置在绝对位置。

.footer { 
    position: absolute;
    bottom: 0px;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM