Bootstrap Modal sitting behind backdrop in Chrome

寵の児 提交于 2020-01-02 03:24:26

问题


I'm using Twitter bootstrap, CSS and JS.

The problem comes from the Modal plugin, it's working fine on Firefox and IE but displays bad in Chrome : the modal successly pop up, but behind the modal-backdrop so it's impossible to use the form (contained in the modal box)

You can have a try by clicking the top right buttons : http://

It's working fine on bootstrap example page ( http://twitter.github.com/bootstrap/javascript.html#modals ) so I guess it's coming from my CSS

I've looked everywhere I could, but couldn't find anything suspicious. What did I missed ?


回答1:


The style -webkit-overflow-scrolling: touch; in section#maincontainer is causing this to happen as it seems to be conflicting with overflow: auto.

I believe that -webkit-overflow-scrolling: touch; is supposed to be used to provide touch screen scrolling overflow within elements that use fixed positioning - so I don't think you need to apply it to section#maincontainer.

You might however want to apply it to modal-body as the parent uses fixed positioning and the content may overflow.

http://css-tricks.com/mobile-webkit-overflow-scrolling/



来源:https://stackoverflow.com/questions/10991085/bootstrap-modal-sitting-behind-backdrop-in-chrome

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