模式出现在固定的导航栏后面 [英] modal appear behind fixed navbar
问题描述
所以我有基于bootstrap的站点和固定导航栏(在页面顶部跟着你),当我想显示模式弹出窗口时,它出现在那些导航栏后面,如何修复?
以及我使用
navbar是固定的,意思是z -index只相对于它的孩子。简单的解决方法是简单地增加外部模式容器上的顶部边距,稍微将其从页面下拉出。
否则,您的模式标记要坐在你的头部,你需要给它一个比父导航栏的z-index更高的z-index。
so i have bootstrap based site with fixed navigation bar (that follow you around the page at the top) and when i want to show modal popup, it appear behind those navigation bar, how to fix?
and i using margo template from graygrids
it also appear in summernote modals for uploading picture, so it looks like all modal will appear behind those navigation bar.
The navbar is fixed, meaning z-index is only relative to it's children. The simple fix is to simply increase the top margin on the outer modal container to push it down the page slightly and out from behind the navbar.
Otherwise, your modal markup has to sit in your header and you need to give it a higher z-index than the z-index of the parent navbar.
这篇关于模式出现在固定的导航栏后面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!