Resolving a mobile matte layer does not cover all page issues

Source: Internet
Author: User

Today in the mobile side of the project encounter mask layer effect, according to the previous PC side I directly to the level mask layer 100% after the test looks perfect but ...

This is embarrassing ....

After reviewing the relevant information that there is a way to solve the problem that is "Prohibit global scrolling"

The touch event in the inside can refer to the HTML5 mobile

Document.addeventlistaner (' Touchmove ', Stoptouchmove,false); // executes the Stoptouchmove function when the hand moves on the screen (blocks default events) // This can be used when the mask layer pops up to execute
Document.removeeventlistener (' Touchmove ', Stoptouchmove,false); // Remove Touchmove Event // this is performed when the mask layer is closed
function Stoptouchmove (e) {           e.preventdefault ();     } // block default Event functions

See how I solved it.

This perfectly solves the problem that the mask layer cannot cover all pages!

Resolving a mobile matte layer does not cover all page issues

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.