Iframe width and heighth won#x27;不变

Iframe width and heighth won#x27;不变,iframe,responsive-design,Iframe,Responsive Design,此iframe的宽度和高度不会更改。我想要反应灵敏的设计。请帮忙 现在: 修改500x500-不工作,仍为300x300: 对于纯CSS解决方案,您需要将iframe包装在容器周围并对其应用样式,有关更多详细信息,请参阅 另一个选项是使用jquery 请拿一台织机 试试这个代码 <html> <body> <style> html,body {height:100%;} .wrapper {width:80%;hei

此iframe的宽度和高度不会更改。我想要反应灵敏的设计。请帮忙

现在:


修改500x500-不工作,仍为300x300:


对于纯CSS解决方案,您需要将iframe包装在容器周围并对其应用样式,有关更多详细信息,请参阅

另一个选项是使用jquery 请拿一台织机

试试这个代码

 <html>
 <body>
 <style>
 html,body        {height:100%;}
 .wrapper         {width:80%;height:100%;margin:0 auto;background:#CCC}
 .iframe1        {position:relative;}
 .iframe1 .ratio {display:block;width:100%;height:auto;}
 .iframe1 iframe {position:absolute;top:0;left:0;width:100%; height:100%;}

 </style>
 <div class="wrapper">
 <div class="iframe1">

    <img class="ratio" src="sometransparentimage.jpg"/>
    <iframe src="http://www.kadinvekadin.net/mod-burclar.php" frameborder="0" 

      allowfullscreen></iframe>
  </div>

  </div>
  </body>
  </html>

html,正文{高度:100%;}
.wrapper{宽度:80%;高度:100%;边距:0自动;背景:#CCC}
.iframe1{位置:相对;}
.iframe1.比率{显示:块;宽度:100%;高度:自动;}
.iframe1 iframe{位置:绝对;顶部:0;左侧:0;宽度:100%;高度:100%;}

您需要使iframe对所有屏幕都具有响应性,或者只需要以500*500的速度显示它们?我需要响应性设计。但此iframe()不可调整大小。大小不更改。如何更改宽度/高度?此iframe设置的最大大小为300x300。例如,我想要350x350,但我不想要这个@Prasannaarthii找到了一个解决方案,检查,希望它能帮助我尝试了两种选择。但仍然是这个iframe:不可调整大小。请帮忙。谢谢你尝试了这个代码和jquery。“sometransparentimage”是有响应的,但iframe没有响应。当我调整浏览器窗口的大小时,此iframe仍然没有响应。有没有其他方法可以实现此iframe?如果iframe中有固定宽度的图像,则无法调整图像大小,只能调整iframe的大小。。您将获得较小尺寸的IBG滚动条我不想调整图像大小,我想要iframe,但iframe不调整大小。你能给我一个例子代码来调整这个iframe的大小吗?谢谢。为上面的代码设置frameborder并检查,我发现iframe正在调整大小