Small bugs often encountered on the mobile side

Source: Internet
Author: User

1. Video does not play automatically


(1) AutoPlay and JS control playback, there are still some devices do not work
(2) $ ("html"). One ("Touchstart", function () {
Video.play ();
})

2 input box, the soft keyboard pop-up will be the bottom of the content to compress, making the bottom layout confusion


(1) Get the total height of the content, assign it to the body, and write the height of the dead body
$ ("Body"). CSS ("height", parseint (". Scroll-wrap"). Height () +$ (". Fixnav"). Height ());
(2) fix fixed positioning element
When the focus is taken (the soft keyboard comes out) The fix positioned element is changed to static location
When you lose focus (the soft keyboard disappears) then change the original fix location element to fix location

(3) input box is obscured by soft keyboard
Https://mingyili.github.io/2015/11/05.html

3, mobile phone photo and upload


<input type= "File" accept= "image/*" >
<input type= "File" accept= "video/*" >
Some Android devices do not support

4, mobile simulation hover


(1) Active analog Document.addeventlisteren ("Touchstart", function () {},true);
(2) JS monitor touch screen event dynamically Add/Remove class class name

5. Modify input placeholder text color


input::-webkit-input-placeholder{color:red;}

6, remove the WebKit default scroll bar


element::-webkit-scrollbar{
Display:none
}

Small bugs often encountered on the mobile side

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.