The solution to the bottom of the mobile end is input method

Source: Internet
Author: User

At the end of the found fixed at the bottom of the button in the page call input method will be top up, many tests found just above the android, I heard that iOS will sometimes, but did not meet, the last method is not to set the bottom fixed absolute positioning, directly using the calculation clientheight to determine the bottom position, Simply put the bottom up to a fixed position,

Here is the HTML

<!    DOCTYPE html>

It is important to set height:100% for HTML and body, mainly to open the height,

Here is the JS

     $ (window). Resize (function () {         var height=document.body.clientheight-+ +"  px";         $ (". Main"). CSS ("height", height)     });

For good results, it is necessary to set an initial position or height for the base or main,

The above implementation is very simple, I feel mainly the transformation of thinking.

The solution to the bottom of the mobile end is input method

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.