【问题标题】:Unless I set the height in my iframe the width is not going 100%除非我在 iframe 中设置高度,否则宽度不会 100%
【发布时间】:2019-05-07 11:42:57
【问题描述】:

我在 WordPress 网站上使用 iframe 来显示 html5 动画,但除非我设置 iframe 的高度,否则它会减小宽度。

谁能帮我解决这个问题?我已经尝试了很多方法来修复它,但没有滚动出现,所以我可以获得 100% 的宽度,它只是减小了宽度。

https://tempart.posabilities.co.uk/our-story/

我认为我的动画代码有冲突:

<div id="animation_container" style="background-color:rgba(255, 255, 255, 1.00); width:960px; height:1615px">
    <canvas id="canvas" width="960" height="1615" style="position: absolute; display: none; background-color:rgba(255, 255, 255, 1.00);"></canvas>
    <div id="dom_overlay_container" style="pointer-events:none; overflow:hidden; width:960px; height:1615px; position: absolute; left: 0px; top: 0px; display: none;">
    </div>
</div>
<div id='_preload_div_' style='position:absolute; top:0; display: inline-block;  width: 960px; text-align: center;'>    <span style='display: inline-block; height: 100%; vertical-align: middle;'></span>  <img src=images/_preloader.gif style='vertical-align: middle; max-height: 100%'/></div>

我也试图让动画在滚动时进行,但完全迷失了!

【问题讨论】:

    标签: css wordpress html iframe html5-canvas


    【解决方案1】:

    这是你的;

        #artkiframeHolder {
        height: 1000px;
        width: 100%;
        position: relative;
        overflow: scroll;
    }
    

    变成这样

    #artkiframeHolder {
        height: 1000px;
        width: 100%;
        position: relative;
        overflow: hidden;
    }
    

    【讨论】:

    • 感谢您,我认为我的动画代码存在冲突。我已在顶部添加了我的原始评论。
    猜你喜欢
    • 2016-08-09
    • 2012-02-23
    • 2014-05-26
    • 1970-01-01
    • 2011-03-17
    • 2016-10-08
    • 2023-04-04
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多