如何在图像上放置iframe?

时间:2012-07-16 16:13:24

标签: html iframe

我想在我的iframe下放置一个图片,但我拼凑了一些代码并且看起来并不完全正确。 iframe包含文本并具有透明背景。你能帮我吗?感谢,

<td width="216" style="position: relative;">
<img src="http://southwestarkansasradio.com/images/onair995.jpg"></a><br>
<img src="http://southwestarkansasradio.com/images/playerbackground.jpg" style="z-index:  -1"/>
<div style="absolute;left:0px;top:0px;font-size: 32px;display: none">
  <iframe name="I1" width="316" height="216" src="http://southwestarkansasradio.com /NowPlaying.html" border="0" frameborder="0" allowTransparency="true">
Your browser does not support inline frames.</iframe>

</div>
</td>

1 个答案:

答案 0 :(得分:3)

<img src="http://southwestarkansasradio.com/images/onair995.jpg"></a><br>
<img src="http://southwestarkansasradio.com/images/playerbackground.jpg" style="z-index:  -1"/>
<div style="position:absolute;left:0px;top:0px;font-size: 32px">
  <iframe width="316" height="216" src="http://southwestarkansasradio.com/NowPlaying.html" border="0" frameborder="0" allowTransparency="true">
      Your browser does not support inline frames.</iframe>
</div>

您在包含iframe的div标记上有'display:none'。我测试了上面的代码,它的工作正如你所解释的那样。