代码之家  ›  专栏  ›  技术社区  ›  Talha Bin Shakir

iframe背景图像

  •  8
  • Talha Bin Shakir  · 技术社区  · 16 年前

     <iframe scrolling="auto" allowtransparency="true" name="main" style="width:100%;height:90%" style="background-image:url(img/bg2.jpg)"> </iframe>
    
    3 回复  |  直到 16 年前
        1
  •  17
  •   jerjer    16 年前

    试试这个:

    <iframe scrolling="auto" allowtransparency="true" name="main" style="width:100%;height:90%;background-image:url(img/bg2.jpg)"> </iframe>
    

        2
  •  -2
  •   Dudman    13 年前

    用div包装您的iframe,并将其放在某个类中。

    <div class="wrap">
    <iframe style="display:none" width="325" height="276" frameborder="0" scrolling="auto"></iframe>
    </div>
    

    .wrap{background:url(somepicture);} .wrap iframe{opacity:0;}

        3
  •  -4
  •   priyanka.sarkar    16 年前

    <div><img src="a.JPG"></div>
    
    <div>
    <iframe style="display:none" width="325" height="276" frameborder="0" scrolling="auto"></iframe>
    </div>