This repository has been archived by the owner on Jul 22, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
layerjs 是一个非常棒的弹窗库,官方介绍时说兼容ie6,但实际上是有一些问题的。“捕获页”是我们常用的一个功能之一,但它的实现方式,使得它不兼容低版本ie。
问题原因:低版本ie有一个bug,就是 z-index 受其父元素z-index影响,当 a 元素的定位低于 其兄弟元素 b 的定位时,那么 a 元素所有的子元素 a-n 的定位都会低于 b元素
解决方案:将捕获元素至于页面的最底部并在原位置添加一个占位元素,当关闭弹窗时,再将占位元素还原为捕获元素