Solve the problem that does not support fixed under iOS

Source: Internet
Author: User
Tags relative touch window

Our company has a fixed style at the bottom of the page, and whenever the keyboard pops up, iOS will get out of shape (Android doesn't have the problem, as far as I know).

I did a simple deal with the product's approval prior to this (method 1).

Method One:

Focus when the fixed block position into relative, this is the simplest way to deal with.

Here's my little demo.

<! DOCTYPE html>  

Method Two:

Position:absolute the position each time you scroll.

Here is my little demo,touch when the hidden processing, input focusout and window resize when the fixed position recalculation.

<! DOCTYPE html>  

The above is my processing method, perhaps there are deficiencies, welcome everyone to put forward valuable opinions and exchanges.



Related Article

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.