How to place an iframe over an image?

2019-07-05 04:37发布

I'd like to place an image under my iframe, but i've pieced together some code and it doesn't appear to be exactly right. The iframe contains text and has a transparent background. Can you help me out? thanks,

<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>

标签: html iframe
1条回答
混吃等死
2楼-- · 2019-07-05 05:20
<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>

You have 'display:none' on the div tag that contains the iframe. I tested the above code and it works as you have explained is should.

查看更多
登录 后发表回答