问题:

在处理iframe框架自适应时,并且已经去掉iframe的边框,但仍然出现底边多出4px或5px高度的情况。如图

iframe底边多出4px或5px解决办法

<div id="content">
    <iframe id="iframe" width="100%" height="100%" marginwidth="0" marginheight="0" scrolling="yes" allowtransparency="yes" frameborder="0" style="border:0;background-color:#FFF;" src="" ></iframe>
</div>

解决办法:

给iframe添加样式:display:block;

<div id="content">
    <iframe id="iframe" width="100%" height="100%" marginwidth="0" marginheight="0" scrolling="yes" allowtransparency="yes" frameborder="0" style="display:block;border:0;background-color:#FFF;" src="" ></iframe>
</div>

iframe底边多出4px或5px解决办法

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-20
  • 2021-12-27
  • 2021-12-30
  • 2022-12-23
猜你喜欢
  • 2021-08-30
  • 2022-12-23
  • 2021-11-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案