Placing callouts over bootstrap carousel

你说的曾经没有我的故事 提交于 2019-12-11 01:46:58

问题


i would like an effect like on this site http://demo.grandpixels.com/ where the divs .callout are layered over the carousel.

I'm trying to do this in bootstrap. But my divs always go under the carousel. I've tried setting z-index of the callouts but that doesn't seem to work.

.callouts {
    display: block;
margin-top: -150px;
z-index: 999999999999999;
}

You can check the basics at http://jsfiddle.net/5ejse/

Thanks in advance!


回答1:


You all but have it. The only thing you are missing is that for z-index to work, it has to be applied to a div whose position has been explicitly set to absolute, fixed or relative.

Check this out: http://jsfiddle.net/panchroma/eyccd/

The code is exactly the same as what you had started, I just tweaked this CSS:

.callouts {
position:relative;  /* <======= added this */
display:block;
margin-top: -150px;
z-index: 999999999999999;
}

Hope this helps!



来源:https://stackoverflow.com/questions/14413658/placing-callouts-over-bootstrap-carousel

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