问题
I want a div to appear on top of a Zurb Foundation reveal modal.
However, my div refuses to be shown on top of the modal.
The z-index of the modal is 1006. When I set my on-top div to 1010, or even 99999, it still sits underneath the modal.
The only way I can get it to work is by setting the foundation modal's .reveal-overlay
's z-index to 0 (even 1 puts it on top of my div), but that messes up other elements.
How can I put an element on top of a Zurb Foundation modal?
回答1:
Your div
needs to on the top level of the dom for this to work.
The following will work.
<div class="reveal">
<h1>my reveal</h1>
</div>
<div style="z-index: 1100; width:500px; height: 500px;
top: 100px; position: absolute;left: 200px;">On top of the reveal</div>
</body>
</html>
来源:https://stackoverflow.com/questions/47847267/putting-something-on-top-of-a-modal-zurb-foundation