Mobile Terminal-notes-dehua. Chen meta Basics
The H5 page window is automatically adjusted to the device width, and the user is not allowed to zoom in the page
1
Viewport template-General
Title
Mobile touch event
The touch event triggered when the user's finger is placed on the mobile device and sliding on the screen
Touchstart -- occurs when your fingers touch the screen.
Touchmove-triggered continuously when the finger slides on the screen. Normally, when we slide the page, the preventDefault () of event will be called to prevent the occurrence of the default situation: to prevent Page scrolling
Touchend -- triggered when the finger leaves the screen
Touchcancel-triggered when the system stops the trace touch. For example, when a prompt box is displayed on the alert () page during the touch process, this event is triggered and is rarely used.
TouchEvent
Touches: information of all fingers on the screen
TargetTouches: the finger information of the finger in the target area
ChangedTouches: the finger information of the last time this event was triggered
When touchend is used, the touches and targetTouches information will be deleted, and the last information stored by changedTouches is best used to calculate the finger information.
How to reset the default appearance of webkit form elements
. Css {-webkit-appearance: none ;}
Can the color value of placeholder be changed in the webkit form input box?
Input:-webkit-input-placeholder {color: # AAAAAA ;}
Input: focus:-webkit-input-placeholder {color: # EEEEEE ;}
Can the placeholder text in the webkit form input box wrap?
Yes for ios, but not for android ~
:-Ms-expand applies to the modification of the drop-down arrow of the form Selection control. It has multiple property values and is set to hide (display: none) we can also use the background image to modify the desired effect.
Select:-ms-expand {
Display: none;
}
The audio and video elements cannot be automatically played in ios and Android.
Solution: Touch Screen Instant Play
$ ('Html '). on ('touchstart', function (){
Audio. play ()
})
The video is not full screen.