Some notes in the development of WebApp

Source: Internet
Author: User

Like most responsive layouts, webapp development also requires a floating layout and a percentage layout, taking into account the small-screen phone 250px and the big-screen device 768px, but is accustomed to 320px and 640px to split, a word in JQ ( function ( ){
$ (window). Resize (function () {
var iswidescreen=$ (this). width ();
if (iswidescreen<320) {
iswidescreen=320;
}else if (iswidescreen>640) {
iswidescreen=640;
}
var ratio = iswidescreen/320;
$ (". w640"). css ({' font-size ': ratio * 16+ "px"});
}). Trigger (' resize ');

Mobile device width can be detected.

When using the Ovflow-y:scroll property, be aware that it is set to absolute, the excess can be scrolled, before the end of the fixed head, using the fixed property, but not compatible in the Apple phone, and then use the JS dynamic for the elements need to be fixed set top and bottom values, Window.scrolly, found that the mobile phone opened to the head and the tail when the page shake badly; and then in order to solve this problem, the use of ovflow:scroll; Hey, spare a big bend, it's a lesson.

Some notes in the development of WebApp

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.