简体   繁体   中英

White space below modal on mobile devices

I have a popup modal with a form in it that displays properly on desktop browsers. On mobile devices, it fills up the entire screen, but reveals a white space below after the content ends. When you scroll back up, the white space blocks some of the content. I can't inspect this element and don't see it in the document outline.

It looks something like this:

在此处输入图片说明

How can I remove the blank space?

Perhaps it is an issue for Clearfix?

See: http://www.jqui.net/tips-tricks/css-clearfix/

Preventing the body from being scrollable when the modal is open on mobile devices solved the problem.

@media screen and (max-device-width: 600px) {
  body.modal-open {
    overflow: hidden;
  }
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM