Differences in width and resolution of bootstrap

Source: Internet
Author: User

First of all in the bootstrap inside all the style and on the PC is based on the PX unit to judge, that is, we say the resolution,

Java code
    1. @media (min-width:1200px) {
    2. ...... The style inside
    3. }


So that is, when your screen zoom in or zoom out is based on the resolution of the PC, when the screen of the smaller PX also shrinks, in the automatic need to find the CSS style



Now is the cell phone bootstrap is some special, their units or px but it is not true px Walk is the entire width of the phone display, this time compared to the width of the public 320-360 of the 320 screen width is relatively single, But when the width of the 360 is more diversified, the road will appear ordinary resolution, and HD resolution two, if still walk with the PC monitor, then we this 360 style will not be effective, but not, why, think, in a 360-width screen, There are a lot of resolution, small to 360*280-big to 1920*800 many have so, we write style words, not to write dead, so note point Bootstrap very clever, they directly converted to the resolution on the phone, directly calculate the width of the style, so it is much simpler, We do not have to worry about the different resolution will run off, only the width of the screen to define the style is good, very good to be easy to understand.

Java code
    1. @media (min-width:360px) {
    2. ...... The style inside
    3. }




So here we need to distinguish clearly, PC-side and phone-side differences, here for everyone to provide a few Android more general screen width for everyone as a reference

320 360 400 480 The screen width of this mobile phone, this four width almost contains all the current Android intelligent machine, in the Small Basic on the farewell to the self-motive, to the big, have not found, how to determine the screen width of a mobile phone, actually very simple

HTML5 Code
    1. Jquery
    2. Alert ($ (window). width ());



Upload to a local, then open your page's address via your phone's browser, and you can jump out of the screen width you need to know.

Differences in width and resolution of bootstrap

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.