gpt4 book ai didi

javascript - IE 11 中的 PDF 查看器与顶部下拉滚动条重叠

转载 作者:行者123 更新时间:2023-11-28 16:21:09 25 4
gpt4 key购买 nike

我有一个工具栏,在 <object></object> 上方有一个下拉菜单标签 (screenshot) .当显示 pdf 文件然后带有滚动条的下拉菜单退出时,滚动条消失在 pdf 文件后面。怎么解决?

有一个代码:

    <div id="modal-content-container">
<div class="modal-header"></div>
<div class="modal-body">
<div class="col-md-12 assign-mode" style="display: block;">
<div class="col-md-2" style="position: relative;">
<div style="position: relative;">
<div style="margin-bottom: 2px;"><label style="margin-bottom: 0px;"><input name="destinationType"
type="radio" checked=""
value="RESIDENT">
Resident</label> <label style="margin-bottom: 0px;"><input name="destinationType" type="radio"
value="COMPANY_FOLDER">
Company</label></div>
<input class="form-control run" id="destinationId" type="text" placeholder="Click to Assign">
<ul class="items" style="display: block; z-index: 1;">
<li class="item" data-resident-id="2">Kathlee Cambria Cole</li>
<li class="item" data-resident-id="1">Amy Davis</li>
<li class="item" data-resident-id="1">Amy Davis</li>
<li class="item" data-resident-id="1">Amy Davis</li>
<li class="item" data-resident-id="1">Amy Davis</li>
<li class="item" data-resident-id="1">Amy Davis</li>
<li class="item" data-resident-id="1">Amy Davis</li>
<li class="item" data-resident-id="1">Amy Davis</li>
<li class="item" data-resident-id="1">Amy Davis</li>
<li class="item" data-resident-id="1">Amy Davis</li>
<li class="item" data-resident-id="1">Amy Davis</li>
<li class="item" data-resident-id="1">Amy Davis</li>
<iframe class="ie-fix" src="about:blank"></iframe>
</ul>
</div>
</div>
</div>
<div class="preview-content">
<div class="embed-container">
<object data="unassignedDocuments/98/preview" type="application/pdf" style="height: 100%;">
<div style="margin: 50px auto; width: 70%; text-align: center;">Your browser does not support file
with this extension. Please download document <a href="unassignedDocuments/98/download">here</a>.
</div>
</object>
</div>
</div>
</div>
<div class="modal-footer"></div>
</div>

最佳答案

问题是,你把<iframe><ul>里面标签打击底层<object>元素,但是 <iframe><ul> 时,尺寸减小了滚动条的宽度达到其最大高度。

所以你要做的是保留<iframe>来自 <ul>最好在它之前:

<div style="position: relative;">
<iframe class="ie-fix" src="about:blank"></iframe>
<ul class="items" style="display: block; z-index: 1;">
<li class="item" data-resident-id="2">Kathlee Cambria Cole</li>
<li class="item" data-resident-id="1">Amy Davis</li>
<li class="item" data-resident-id="1">Amy Davis</li>
<li class="item" data-resident-id="1">Amy Davis</li>
<li class="item" data-resident-id="1">Amy Davis</li>
<li class="item" data-resident-id="1">Amy Davis</li>
<li class="item" data-resident-id="1">Amy Davis</li>
<li class="item" data-resident-id="1">Amy Davis</li>
<li class="item" data-resident-id="1">Amy Davis</li>
<li class="item" data-resident-id="1">Amy Davis</li>
<li class="item" data-resident-id="1">Amy Davis</li>
<li class="item" data-resident-id="1">Amy Davis</li>
</ul>
</div>

然后您将需要一些 CSS 来将它们对齐:

.ie-fix {
position: absolute;
width: 100%;
height: 300px;
z-index: 1;
}
.items {
position: absolute;
width: 100%;
max-height: 300px;
z-index: 1;
}

关于javascript - IE 11 中的 PDF 查看器与顶部下拉滚动条重叠,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36796690/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com