1

I have a jsf page with some bootstrap popovers. These popovers are draggable, using jQuery for that.

When I click on a button to show a modal, it's shown on the screen, but the popovers keep showing over the modal. Here is an image that illustrates my thing.

As you can see, the popovers are over the modal.

I realized that on bootstrap.css, the z-index of popover is greater than modal (the first is 1060 and the second 1050). I tried to alter the z-index of the modal, setting a bigger value, but it didn't work.

So, I'm wondering if somebody just faced this problem.

4

1 回答 1

3

它肯定与 z-index 有关。使用浏览器的检查器来确定是否真的应用了 z-index。如果没有,也许将属性设置为重要:

.modal {
  z-index: 2000 !important;
}

是否可以成功覆盖 CSS 样式(位置、选择器的具体程度等)始终取决于上下文

于 2014-09-11T13:05:56.303 回答