我正在尝试将图像覆盖在嵌入到 iFrame 中的 pdf 之上。
此代码导致图像落在 iFrame 后面(通过将 bottom 属性更改为 -10px 进行测试,图像底部可见)
我所知道的仅有的两种方法是使用 z-index,并且事实绝对位置应该将对象放在顶部,但似乎都不起作用。
<div id="images" style="float:right;position:relative" width="400" height="250">
<img src="images/Next_Black_Arrow.png" style="height:25px;width25px;float: left;z-index=10;position:absolute;bottom:10px;left:250px;">
<iframe SRC="testFiles/Categories of pattern matching characters.pdf#toolbar=0&navpanes=0&scrollbar=0" style="z-index=1;position:relative;" width="400" height="250"></iframe>
</div>
*缺少分离的css的应用
虽然这行得通,但不幸的是,如果您将 iframe 链接更改为 pdf,则行不通。
参见 http://jsfiddle.net/vr4rX/4/
我认为这一定是adobe reader 中的错误。真的可以解决这个问题。
最佳答案
看看我的解决方案:http://jsfiddle.net/vr4rX/1/
HTML:
<div id="images">
<img src="http://t1.ftcdn.net/jpg/00/02/78/72/400_F_2787285_mlDf8ah974XHflVFrbQB3FM6Qxu1MT.jpg" />
<iframe SRC="http://www.google.de" width="400" height="250"></iframe>
</div>
CSS:
#images {
float:right;
width: 400px;
height: 250px;
position: relative;
z-index: 1;
}
#images img {
height:25px;
width:25px;
z-index=2;
position:absolute;
bottom:20px;
right:20px;
}
关于image - 在嵌入式 pdf 上方叠加图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6028327/