Mobile H5 Page FAQ Summary

Source: Internet
Author: User

Starting from last year in the company has been doing embedded H5 page, met a lot of problems, do a little summary ~

1.IOS device links, buttons and other clicks produce a gray background

In the proud iOS can be clicked when the element is clicked will appear the highlight color of the display, that is, a gray shadow, especially ugly, especially in the area of the element is still relatively large. This can be done by

                     -webkit-tab-highlight-color

This CSS property to set, you can change to any of the colors you want, can also be removed.

-webkit-tab-highlight-color:rgba (0,0,0,0);
Remove background highlighting

-webkit-tab-highlight-color:red;
Set the color of the background highlight
A 2.ios device browser or a fixed-positioned part of Safari will follow the slide beat

What is called beating, is that you slip on the fixed positioning of the part will follow you on the slide, the end of the slide will bounce back to the location of the position, the leader saw did not scold me, the seriousness with me, you this effect a little dazzle ah, the user experience full score, (manual embarrassment) ...

According to my experience (the user experience full score), the mobile side try not to use fixed positioning, in iOS will appear a lot of messy effects, such as the painful keyboard pop-up, will give you a bottom upside down! How to Solve, product by (Jian) (ren) effect or to achieve AH, I now think the best solution is to use all Position:absolute (Welcome to discuss)

General H5 page Common layout is almost like this

How to use absolute to achieve the fixed effect, good, the old couple began to dazzle the skill #_#

1 //First is HTML 2 <body> 3     <div class= ' header ' >header</div>4    <div class= ' main ' >main</ Div>5    <div class= ' footer ' >footer</div>6</body >
//css.header{width:100%;Height:100px;position:Absolute; Left:0;Top:0; }. Footer{width:100%;Height:100px;position:Absolute; Left:0;Bottom:0; }. Main{width:100%;position:Absolute; Left:0; Right:0;Top:100px;Bottom:100px;//These two sentences are the key}

All the sliding parts are placed in the middle of the main, perfect,-_-#

This is very cool, but a lot of small partners to try after the product is certainly godless, you this sliding effect is not ah, how sometimes a card! No way, how can I write something ... Well, really one card a card ...

How to be like the native general silky??? There's another CSS property.

                   -webkit-overflow-scrolling
/**//**/

Of course, the choice of-webkit-overflow-scrolling:touch; It's so slippery ~

First write here, the rest of the next article ...

  

  

Mobile H5 Page FAQ Summary

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.