javascript - 我怎样才能使我的内容 iframe 响应?
问题描述
我有一个问题,我无法调整 iframe 的大小以完全响应(我的意思是,内容!)
<iframe src="https://www.meteoblue.com/fr/meteo/widget/three/saint-jean-de-braye_france_2979341?geoloc=fixed&nocurrent=0&noforecast=0&days=4&tempunit=CELSIUS&windunit=KILOMETER_PER_HOUR&layout=image" frameborder="0" scrolling="NO" allowtransparency="true" sandbox="allow-same-origin allow-scripts allow-popups allow-popups-to-escape-sandbox" style="width: 460px;height: 594px">
解决方案
这样做
.iframe-container{
max-width:700px;
width:100%;
margin:0 auto
}
<div class="iframe-container">
<iframe src="https://www.meteoblue.com/fr/meteo/widget/three/saint-jean-de-braye_france_2979341?geoloc=fixed&nocurrent=0&noforecast=0&days=4&tempunit=CELSIUS&windunit=KILOMETER_PER_HOUR&layout=image" frameborder="0" scrolling="NO" allowtransparency="true" sandbox="allow-same-origin allow-scripts allow-popups allow-popups-to-escape-sandbox" style="width: 100%;height: 594px"></iframe>
</div>
推荐阅读
- c++ - boost.spirit qi中序列和列表运算符的属性?
- sql - Access 中某个类别中的运行总计
- javascript - 掩码输入值日期格式角度
- docker - 自动增加副本数
- excel - 由工作表更改事件触发的复制粘贴值不起作用
- javascript - JS 将数组拆分为 X 块,然后是 Y 块,依此类推
- react-native - 获取数据firebase并编写文本反应本机
- python - 我尝试从 PIL 导入 ImageEnhance,但出现 OSERROR,我该如何纠正?
- javascript - 将字符串中的所有数字四舍五入
- bash - 在脚本中插入多行“find”,每行都有自己的命令“-exec”,在“-exec”上发出错误信号:缺少参数