css - 除非我在 iframe 中设置高度,否则宽度不会 100%
问题描述
我在 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>
我也试图让动画在滚动上进行,但完全迷失了!
解决方案
推荐阅读
- python - Pytest - 在模拟的嵌套属性函数/方法上模拟副作用
- angular - Angular 9 - 刷新视图 ngOnChanges。为什么我需要使用 ChangeDetectorRef?
- snowflake-sql - 想要添加 2 列美元符号
- xml - 如何在不增加 Seekbar 大小的情况下创建更大的 Touchbox [Android Studio] [XML]
- r - R - 通过 Openxlsx 导出列表,其中单独排序的列将 NA 值放在最后
- php - nginx上的Codeigniter 4 url重写给出404错误
- javascript - 在 cshtml 视图中调用 window.onload
- linux - 将windows上的两个文件夹与两个linux服务器文件夹同步
- python - 我正在尝试运行 ssh 到远程机器以检查可用性的自动化脚本。在 CircleCi 运行时获取身份验证失败错误
- c# - JwtSecurityTokenHandler().WriteToken(token) 在托管环境中抛出错误