Html 图像开销iframe

Html 图像开销iframe,html,image,iframe,Html,Image,Iframe,我想在iframe上放置一个图像。为了更好地理解,我附上了下面的图片 我该怎么做? 您可以尝试以下方法: <iframe name="inlineframe" src="sample.html" frameborder="1" scrolling="auto" width="500" height="180" marginwidth="5" marginheight="5" ></iframe> <div style="position:absolu

我想在
iframe
上放置一个图像。为了更好地理解,我附上了下面的图片

我该怎么做?

您可以尝试以下方法:

    <iframe name="inlineframe" src="sample.html" frameborder="1" scrolling="auto" width="500" height="180" marginwidth="5" marginheight="5" ></iframe>
    <div style="position:absolute;
    left:0px; //edit as per iframe placement
    top:0px; //edit as per iframe placement
    z-index:-1;
    padding:5px;"> 
    <img src="rac_ftp.PNG" width="500" height="180" />
    </div>

您可以使用
位置:绝对
z索引

HTML:

…这样,图像将在iframe上分层,并防止在其内部单击

<iframe src="http://jsfiddle.net/"></iframe>
<img src="http://flickholdr.com/600/400/dogs">​
iframe{
  width: 600px;
  height: 400px;
  border : 2px solid  black;
  z-index: 2;
}

img{
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  opacity: 0.3;
}