Javascript-how to solve the problem of getting focus from input in Apple 5, and shielding input with a soft keyboard

Source: Internet
Author: User
The problem is that when the wap page gets the focus on the Apple 5 mobile phone, it will block the input box. how can this problem be solved?

The problem is that when the wap page gets the focus on the Apple 5 mobile phone, it will block the input box. how can this problem be solved?

Reply content:

The problem is that when the wap page gets the focus on the Apple 5 mobile phone, it will block the input box. how can this problem be solved?

In fact, @ is the solution. for details, refer to weui demo...

Why is it blocked? I guess you used the percentage to write the location ~ If the percentage is used, do not write 100% for the html height on the outermost layer. just use JS to assign the page height to it.

This is caused by position: fixed. Solution: replace fixed with relative when getting focus

@ Code crazy. you don't need to write fixed. It can be determined that it is also a solution to move the input box up when you click.

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.