【发布时间】:2017-03-30 06:49:10
【问题描述】:
我有一个带有.less 文件的文档查看器:
div.document-previewer-container {
//height: 400px;
//width: 300px;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
//padding: 5px 2px;
> div.document-preview {
height: 88%;
//width: 100%;
position: relative;
.document-container, .text-container, video, iframe, pre {
height: 100%;
width: 100%;
position: relative;
}
.document-container > img {
max-height: 100%;
max-width: 100%;
}
.text-container pre {
margin: 0;
padding: 0;
}
.doc-overlay {
width: 95%;
height: 95%;
position: absolute;
cursor: pointer;
top: 0;
p {
padding: 2px;
}
}
}
}
我的html是
<div class="document-previewer-container">
<div class="document-preview">
<h3 ng-click="vm.openPDF()">yu</h3> <----- THIS CLICK IS WORKING
<div class="document-container">
<!-- PDF show in iframe -->
</div>
<div class="doc-overlay" ng-click="vm.openPDF()"> <---- THIS CLICK ISN'T becuse if is hidden by iframe
<!-- any content is shown on the top of PDF file in chrome only, not in IE -->
</div>
</div>
</div>
</div>
我的点击事件在标签上起作用,但在使用 css 类“doc-overlay”点击 div 时不起作用。
如何处理
我正在使用 IE11 的 Foxit Reader 插件
更新1
我发现了this 我认为我正在发生的问题。 iframe 与
.doc-overlay重叠,因此点击不起作用。 对此有任何建议
【问题讨论】:
标签: javascript html css angularjs