To develop web apps in recent times, here are some personal experiences.
About the responsive layout I'm using
1,viewport
The META tag's purpose is to make the current viewport width equal to the width of the device, while not allowing the user to scale manually. May not allow users to scale different sites have different requirements, but let viewport width equal to the width of the device, this should be the effect that everyone wants, if you do not set it, then will use that than the screen width of the default viewport, that is, the horizontal scroll bar appears.
| Width |
Sets the width of the layout viewport , as a positive integer, or the string "Width-device" |
| Initial-scale |
Sets the initial zoom value of the page, which is a number that can be taken with decimals |
| Minimum-scale |
Allows the user's minimum zoom value to be a number that can be taken with decimals |
| Maximum-scale |
Allows the user's maximum zoom value, which is a number that can be taken with decimals |
| Height |
Sets the height of the layout viewport , which is not important to us and is seldom used |
| User-scalable |
Whether the user is allowed to scale, the value is "no" or "yes", no is not allowed, yes means allow |
MORE: http://www.cnblogs.com/2050/p/3877280.html
Later content is purely copy-and-paste, mainly the default width of the object and zoom out to set.
px, EM, rem in 2,css
Learn more: http://www.cnblogs.com/kemeng/p/3652417.html
This speaks very well.
3, Calc ()
Learn more: http://www.cnblogs.com/jennifer900522/archive/2012/10/31/2748418.html
Note the space. Note compatible with-webkit-calc () I often forget
Use this to dynamically calculate the width without writing dead such as: Width:calc (100%-2rem); 100% is the width of the parent
4,media screen
Learn more: http://www.cnblogs.com/xcxc/p/4531846.html
A summary of the development of web apps in recent time a responsive layout