admin管理员组文章数量:1363924
I am opening a modal but when I do this the page behind the modal goes very dark. Can someone explain how I can change this. For example how could I make it so there's just a very light shading on the background.
I also notice that when I click the background then my modal disappears. Is there a way I can remove this functionality. I would like my modal to only go away when the user clicks submit or close on the modal itself.
I am opening a modal but when I do this the page behind the modal goes very dark. Can someone explain how I can change this. For example how could I make it so there's just a very light shading on the background.
I also notice that when I click the background then my modal disappears. Is there a way I can remove this functionality. I would like my modal to only go away when the user clicks submit or close on the modal itself.
Share Improve this question asked Apr 16, 2012 at 10:52 user1321237user13212373 Answers
Reset to default 8If you're looking to keep the backdrop behind the modal but make the backdrop pletely transparent, set a transparent background-color instead of changing the opacity:
.modal-backdrop, .modal-backdrop.fade.in { background-color: rgba(0,0,0,0); }
This allows you to be able to click off of your modal and have your modal close while not actually seeing the backdrop.
What your looking for is http://twitter.github./bootstrap/javascript.html#modals modal backdrop static to disable closing on background click.
Also for the backdrop darkness adjust the
.modal-backdrop, .modal-backdrop.fade.in {
opacity: 0;
}
If you are using bs 3, you can use data-backdrop="false" attribute in your link so you dont have to modify your base bootstrap files.
It's in the documentation
本文标签:
版权声明:本文标题:javascript - How can I change the way I see the page behind when I open a Twitter Bootstrap modal? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1743810350a2542953.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论