Some time ago, I took charge of the front-end work of the company's wap station. At present, the foundation of the wap station and several complicated pages have been released. I have posted some experiences based on my own experience, hope to help some people who may be connected to the Wap site now or in the future
I. The design size of this WAP website is 640 *. I personally feel that the 640px width is a good choice, mainly for the following reasons:
1. Currently, the physical size of mainstream mobile phones is between-. In this way, you can adapt to most screens by setting the viewport attribute. The setting method is as follows:
<Meta content = "width = device-width, initial-scale =, maximum-scale = 1, user-scalable = no" name = "viewport"/> (iphone)
<Meta content = "width = device-width, target-densitydpi =, user-scalable = no" name = "viewport"/> (android)
2. Set initial-scale = 1 on the ipad device. You can also browse it normally. Recently, I saw m.taobao.com, and his size is 320, the display on the ipad is too small.
For the layout of the dimension 640, we recommend 20-600-20, that is, the left and right padding: 20px, and the body content is 600px.
II. For js library functions on the wap site, I thought that if there is not a strong demand for swipe, tab, and other sliding events, do not introduce js library functions, the native js + html5 + css3 can basically achieve a majority of smooth results. Currently, zepto is the recommended framework on the Internet. js, jquery-mobile, sencha touch, etc. I compared zepto. js and jquery-mobile. It seems that mobile is too large. If zepto introduces event. js and touch. js is not small, and zepto-core + event + touch is not highly practical. New attributes such as transition, transform, and animation in css3 have no problems in implementing dynamic effects, we recommend that you do not reference database functions.