"Fixed" CSS style in Mobile safari

Source: Internet
Author: User

Recently encountered a problem in the implementation of a question and answer HTML page: Question and answer when you get the full score, there is a step to enter the mobile number Senate lottery,

after filling out the phone number, click the Finish button (do not hide the soft keyboard). in the case of direct click submit button, the Submit button should show a full screen cover,

But at this point only shows the middle of the paragraph (hide the soft keyboard is normal), after the last discovery is cover layer position is set to the reason of fixed,

Fixed is based on the browser window to locate (at this time the percentage size is also relative to the window size), so the display of cover is only the soft keyboard display above the paragraph, the solution is to use absolute or through resize, scroll trigger the browser redraw.

Absolute

Creates an absolutely positioned element that is positioned relative to the first parent element other than the static anchor.

The position of the element is defined by the "left", "Top", "right" and "bottom" attributes.

Fixed

Generates an absolutely positioned element that is positioned relative to the browser window.

The position of the element is defined by the "left", "Top", "right" and "bottom" attributes.

"Fixed" CSS style in Mobile safari

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.