Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/matlab/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
iframe全宽保持扩展宽度_Iframe_Width - Fatal编程技术网

iframe全宽保持扩展宽度

iframe全宽保持扩展宽度,iframe,width,Iframe,Width,我试图在另一个div旁边的一个div中使用iframe,但是,它没有得到全宽,而是得到了更大的宽度,所以你必须滚动才能看到它,它首先是网站 这是一个发生了什么的例子,我应该怎么做 这是我的沙发 <div class="izquierda"></div> <div class="derecha"> <iframe width="560" height="315" src="//www.youtube.com/embed/DL67BuPR2PQ" fra

我试图在另一个div旁边的一个div中使用iframe,但是,它没有得到全宽,而是得到了更大的宽度,所以你必须滚动才能看到它,它首先是网站

这是一个发生了什么的例子,我应该怎么做

这是我的沙发

<div class="izquierda"></div>
<div class="derecha">
  <iframe width="560" height="315" src="//www.youtube.com/embed/DL67BuPR2PQ" frameborder="0" allowfullscreen></iframe>


</div>


移除宽度:100%;在您的cssiniframe中,这将导致iframe扩展到与div一样宽

如果要增加iframe的宽度,请增加iframe标记中的宽度,如下例所示

<iframe width="700" height="315" src="//www.youtube.com/embed/DL67BuPR2PQ" frameborder="0" allowfullscreen></iframe>

否则,减少css中div.derecha的宽度

<iframe width="700" height="315" src="//www.youtube.com/embed/DL67BuPR2PQ" frameborder="0" allowfullscreen></iframe>