Several interviews in Ali, always asked what the difference between mobile and PC side, when the answer is mainly answered in the compatibility, speed, adaptation, page layout and other aspects of the difference, but still very not system, so here to do a summary.
First: The pc is about browser compatibility , and mobile development is more about phone compatibility , as the current Android phone or iOS phone is generally Browsers are using the WebKit kernel , so to do mobile development, more consideration should be the phone resolution of the adaptation, and different operating systems slightly differentiated.
Second: In the processing of part of the event, the mobile side of the event is a touch-screen event , and The missing is the hover event . In addition, including mobile phone pop-up keyboard processing, such problems on the PC side are not met.
Third: In the layout, mobile development is generally to achieve the layout of adaptive, I have been using the REM layout, feel good.
Four: In the animation processing ,pc side due to consider the compatibility of IE , so usually use JS to do the animation of the commonality will be better, but CSS3 made a great sacrifice, and on the phone , if you want to do some animation, special effects, etc., The first choice must be CSS3, simple, efficient and high .
Five: Some of the interface groups can be implemented again, familiar with the benefits, such as through the sharing of articles, title, description, icon and other icons of the configuration, these will be.
Sixth: Baidu map Some API interface, also have to realize, these for mobile, lbs is a very important feature, so the map this piece is definitely to understand, in addition Baidu map this piece is already a more mature platform, so learning is also easier.
Seventh: CSS3 animation must be relatively skilled, which is used in the mobile side or more.
Eighth: General PC end with jquery, Mobile end with Zepto, because the mobile traffic is still more important, so the introduction of resources or plug-ins, can be small, a 30k of resources and a 80k of resources, in the mobile side of the difference is quite large.
While the uncompressed jquery is 262kb, the compressed Jquey is 83KB, which shows the difference between the two.
Nineth: It is best to master a complete front-end development architecture, such as modular, packaging, compression, caching, conditional can also do some automated testing, and so on, more useful has FIS, in addition, want to quickly improve their front-end development technology, delve into the front-end architecture This piece is a very good direction.
Tenth: Performance optimization, including the opening speed of the first screen , user response delay, rendering performance, animation frame rate and so on the phone need special attention.
This article is organized from: Know
Front-end: The difference between mobile and PC