Putting something on top of a modal (Zurb Foundation)

半世苍凉 提交于 2020-06-01 07:07:33

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!