Mobile phone side small problem finishing

Source: Internet
Author: User

1,A translucent gray background appears after tap. At first thought is outline mischief, plus after found no reaction. The final discovery is a tap behind the background highlighting, to reset this performance, you need to set the-webkit-tap-highlight-color to the desired color. Direct transparency:A,img,button,input,textarea{-webkit-tap-highlight-color:rgba (255,255,255,0);}

2, in addition, how to remove the default style of Textarea,input (on iOS, such as rounded corners and inner shadow, Android not tested): Input,textarea,a{-webkit-appearance:none;}

Remove Click Background highlight:-webkit-tap-highlight-color:transparent;

3, the phone-side Click has a second delay is obviously oh ...

Assume that the Tap/touchstart event is set. Click will still trigger. It looks like a click through and requires stop to prevent the click event from triggering.

4, Forbidden number recognition: <meta name= "format-detection" content= "Telephone=no" >

5, the scroll bar appears after the problem of solving:-webkit-overflow-scrolling:touch;

6, different browser access width is not uniform: document.body.clientWidth is more reliable; Window.innerwidth Safari is incorrect. Window.screen.width Android Browser is not correct.

7, multiple clicks absolute Positioning div shift problem: change to fixed positioning, may cause other div also need to set to fixed.

See also a "little tricks css to solve mobile iOS incompatible position:fixed"

8, long press the picture need to wait for more than 5s appear to save the picture pop-up window, mostly because the picture is too large. CDN acceleration can solve this problem.

9,overflow:hidden in the iphone safari, you can set a div inside the new div set Position:relative;overflow:hidden can be;

10. The transform property renders a new space that causes the fixed position to be set to the transform Div as the benchmark. Resolution: 1. The fixed positioning element is taken out of the transform element; 2. It is possible for JS to remove the attribute after the animation has finished running, and the Z-index will fail.

11,flex layout in the UC browser span tag needs to be changed to div to take effect

Phone-side Debug Tool: Weinre



Mobile-to-AppStore download app

Html:

<div id= "Wechattip" class= "Wechat-tip" >

</div>

Css:

. wechat-tip {

Text-align:right;

Display:none;

position:fixed;

z-index:1000;

width:100%;

height:100%;

left:0;

top:0;

Background-color:rgba (0,0,0,0.8);

}

. wechat-tip img {

max-width:88%;

Margin-right:1rem;

}

Js

$ (document). On (' Click ', ' #download ', function (event) {

var useragent = Navigator.userAgent.toLowerCase ();

if (/(Micromessenger)/i.test (useragent)) {

Event.preventdefault ();

$ (' #wechatTip '). Show ();

} else if (/(Iphone|ipad|ipod|ios)/i.test (useragent)) {

Return

} else if (/(Android)/i.test (useragent)) {

Event.preventdefault ();

window.location = "http://www.mioji.com/download/android/MiojiTravel_1_v1.1.0.apk";

} else{

Event.preventdefault ();

Alert ("Please download the app using an Android or an Apple phone. ");

}

});


Small problem sorting on mobile phone side

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.