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