我想在我的 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>
最佳答案
<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”。我测试了上面的代码,它像你解释的那样工作。
关于html - 如何在图像上放置 iframe?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11508306/