H5 Phone page anatomy

Source: Internet
Author: User

<!--forcing rendering with the WebKit kernel--
<meta http-equiv= "x-ua-compatible" content= "Ie=edge, chrome=1"/>

<!--Mobile Viewport control--
<meta name= "viewport" content= "width=device-width,initial-scale=1.0,minimum-
Scale=1,maximum-scale=1,user-scalable=no ">

<!--the number by default to display the dial-up link minus--
<meta name= "format-detection" content= "Telephone=no"/>

Design and development process
Transduction, refactoring, front-end knowledge, flexibility
Multi-page vision to a Web document, take visual difference effect to complete the page display
Music does not follow the page, position fixed, play rotation, can be paused

Mobile-side projects:
Structural layer: HTML5
Presentation layer: CSS3
Special effects: Use CSS3 to complete the main effects, using JavaScript to control the interaction

Background music directly takes control of the API of JavaScript control audio

You can use the original JavaScript control CSS3 to achieve page turn effect, discard the front end frame and class library

Performance Optimization Analysis:
Project as a mobile project to simplify structural layer labeling as much as possible
Use as few images as possible, using CSS3 control labels to finish the picture directly
Minimize file size, compress pictures to lossless minimum
Reduce server requests and replace front-end frameworks like Zepto with original eco-JavaScript

Transduction----reconstruction---front-end optimization

CSS3 length unit VW, VH (MOBILE-adaptive)

1{font-size: 8vw;}

(VW this value * The width of the current viewport)/100 = The font size of the h1 element */element is the font size unit is mm*/
VW This value = (h1 element's font size *100)/width of the current viewport

1 Div{2 position:Absolute;/*relative to the parent element position:fixed;*/3     /*Center relative to parent element*/4 Top:0;5  Right:0;6 Bottom:0;7  Left:0;8 margin:Auto;9}
1 /*do not write these two wildcard characters by default height to open up, write up the full height of the page*/2 HTML,3 Body{4 Height:100%;5}6 7 Div{8 width:45VW;9 Height:71.2VH;Ten font-size:3.506rem; One}

Page flipping has a fade-in animation effect

About REM units:

REM Ie6-8 is not supported, regardless of the compatibility of low version ie, REM is relative to the root element
1 HTML {font-size:10px;} 2 Body {font-size:1.2rem; /* in contrast to HTML, it's actually 12px. */} 3 H1 {font-size:1.6rem;}

At the beginning of the initialization is written on the HTML, the body is unified relative to the HTML (root)

H5 Phone page anatomy

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.