Understanding of mobile phone viewport

End of the phone is slow because the click event when triggered by an event such as 300ms to verify whether
there is the next click event, if any, is regarded as double-clicking, it is possible to enlarge the viewport
or pop up the menu features a bug so you need to touch the phone event
width of the viewport phone without the constraints of the viewport, then the general is 980px so it is necessary constraint
after the viewport viewport is usually about the width of mobile phones 440px so when the phone side display
you can see the full page of results this 440px also called ideaviewprot
front of 980px is called .... forget that Steve Jobs agreed to do it because there is no mobile phone web page
to see the page when the PC port of the scroll bar, but there will not be a large number of blank
touch event there will be no delay touchstart touchmove touchend there are three
touchstart represent only the beginning of touch trigger once only
touchmove indicates touch mobile said finger sliding screen in the beginning start
only when the movement began to trigger the method above events must be dom2.0 binding
addeventlistener (function, function , false- whether bubbling)
can not be used dom0 Stage manner binding addEventlistrener
document.addEventListener ( "touchstrat", function (event))
This event has a toucher array inside each touch a touch flag source
information inside positions force: 1
It represents the length of the array event.touches.length event.touches
event.touches [i] from the viewport .clientX
page screen page screen

 

Guess you like

Origin www.cnblogs.com/ljy0414/p/11122708.html