gpt4 book ai didi

jquery - 用于响应式屏幕分辨率和平板电脑纵向模态的 Iframe 全屏

转载 作者:行者123 更新时间:2023-11-28 16:56:56 27 4
gpt4 key购买 nike

我写了一些代码来管理响应式全屏 iframe。它几乎可以正常工作:)。问题是当屏幕分辨率为 1680x1050 时(参见 picture )。因此,在那种情况下,我想将 iframe 移动到屏幕中央,上下使用相同的黑色背景。添加,使用相同的 css,当 iframe 在平板电脑上的纵向模态全屏时,我想这样做。

.FullScreen {
&-target {
position: fixed !important;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 20000;
width: 100vw;
height: 100vh;
background: #0a0a0a;
}

&-button {
cursor: pointer;
font-size: 40px;

&--active {
/*....
....*/
}
}
}
}
<div class="mne-contentBorder js-fullscreen-target FullScreen-target">
<div class="myEMLObj">
<div class="EMLObj-wrapper">
<img class="EMLObj-placeholder" src="data:image/gif;">
<iframe class="myObject-Iframe js-Iframe" src="" name="Iframe" frameborder="0"></iframe>
</div>
</div>
</div>

Don't care about white rectangle in the ifame, just focus in the black background caused by screen resolution

For tablet

最佳答案

尝试为iframe添加css

iframe{
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
height: 100%;
width: 100%;
}

关于jquery - 用于响应式屏幕分辨率和平板电脑纵向模态的 Iframe 全屏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56162385/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com