相关疑难解决方法(0)

z-index在iframe中使用pdf的Internet Explorer中不起作用

我无法z-index使用iframe包含IE8的pdf文件.它适用于谷歌浏览器.

示例(JSFiddle):

HTML

<div id="div-text">
      <div id="shouldBeOnTop">my text that should be on top</div>
</div>
<div id="div-frame">
    <iframe src="http://legallo1.free.fr/french/CV_JLG.pdf" width="200" height="200"/>
</div>
Run Code Online (Sandbox Code Playgroud)

CSS

#div-text{
    position:relative;
    left:210px;
    top:20px
}

#shouldBeOnTop{
    position:relative;
    right:60px;
    background-color:red;
    width:100px;
    z-index:2;
}

#div-frame{
    position:relative;
     z-index:1;
}
Run Code Online (Sandbox Code Playgroud)

css pdf iframe internet-explorer z-index

57
推荐指数
2
解决办法
5万
查看次数

如何在<iframe>中打开PDF文件?

我想在iframe中打开pdf文件.我使用以下代码:

<a class="iframeLink" href="https://something.com/HTC_One_XL_User_Guide.pdf"
   jQuery1640737952376988841="85"> User guide </a>
Run Code Online (Sandbox Code Playgroud)

它在Firefox中正常运行,但它没有在IE8中打开.

有谁知道如何让它也适用于IE?

html javascript browser pdf iframe

32
推荐指数
3
解决办法
22万
查看次数

标签 统计

iframe ×2

pdf ×2

browser ×1

css ×1

html ×1

internet-explorer ×1

javascript ×1

z-index ×1