全高iframe

问题描述 投票:0回答:1

在wordpress中我使用的是一个创建这个iframe的插件:

<iframe scrolling="no" allowfullscreen="" src="http://...k.jpg&amp;is_stereo=false" width="100%" height="1200px"></iframe>

这是php页面的数组:

    $a = shortcode_atts( array(
   'img' => '',
   'video' => '',
   'pimg' => '',
   'stereo' => 'false',
   'width' => '100%',
   'height' => '1200px',
   ), $atts );

这个PHP代码:

    <iframe width="<?php echo $a['width']; ?>" height="<?php echo $a['height']; ?>" scrolling="no" allowfullscreen src="<?php echo $iframe_url; ?>"></iframe>

宽度是完美和响应。

我需要一个全高度的iframe。怎么样?

php jquery html
1个回答
0
投票

您可以尝试查看是否有效:

<div style="height: 100%; width: 100%;">
    <iframe width="<?php echo $a['width']; ?>" height="<?php echo $a['height']; ?>" scrolling="no" style="height:100%;width:100%" allowfullscreen="1" src="<?php echo $iframe_url; ?>"></iframe>
</div>

输出应该是

<div style="height: 100%; width: 100%;">
    <iframe scrolling="no" allowfullscreen="1" src="http://...k.jpg&amp;is_stereo=false" style="height:100%;width:100%"  width="100%" height="1200px"></iframe></div>
© www.soinside.com 2019 - 2024. All rights reserved.