Mobile web-- beginning

                                                         beginning

  1. Mobile Internet features
  2. Mobile Browser
  3. Mobile web and native app
  4. Resolution

 Mobile Internet features

 " Compact and lightweight " and " easy communication " two characteristics, which determines the difference is simply the mobile Internet and the Internet at the PC ,

Mobile Browser

Mobile browsers include built-in browser , downloadable browser , proxy browser and WebView

Mobile web and native app

Mobile web development cycle is short but very weak calls for hardware devices

The native app is just the opposite

Resolution

Resolution refers to the screen image precision, it refers to the number of pixels of the display can be displayed. The 940 * 680 indicates the horizontal screen has 940 pixels, 680 vertical pixels.

  • screen size 
    • The length of the screen diagonal
    • Unit 1 inch equals 2.54 cm

Pixel is divided into three types:

  1. Equipment pixels
  2. Device-independent pixels
  3. CSS pixels

Equipment pixels

Also known as the physical pixel, which represents the real pixel display device. It is fixed from the outset, which represents the number of pixels on the screen. That screen size of the phone's resolution representation.

Device-independent pixels

Individual pixels appear equipment in order to achieve the resolution of the screen (i.e., physical pixel) layout inconsistencies caused by inconsistencies. It is just to get the same picture size or layout displayed in different screen the same. The physical pixel iPhone3 is 320 * 480, the device independent pixels 320 * 480, device pixel iPhone4 640 * 960, the device independent pixels 320 * 480, in order to allow the same image or layout size displayed in different screen Like, so we use the device-independent pixels to set the image size.

Independent pixel device also can be set, but no one nothing to do to set it, so in the absence of scaling, device independent pixels can be equivalent to the CSS pixel.

Pixels may be acquired by the device independent following code:

screen.width // width

screen.height // height

 CSS pixels

CSS pixel is a web programming concepts, the unit used to measure pixels on logic, which is used when we do web pages pixels, is abstract, not real. We see pictures of zoom in and css pixel is changing. It is the principle of change, when the image to enlarge it doubled a css = 2 pixel device independent pixel or pixels equal to the number of devices, so a pixel image equipment accounted for two independent pixels. Relatively accounted for in the screen area becomes larger.

Summary: So css pixels are individual pixels of multiple devices, and device-independent pixels is a multiple device pixels.

Published 14 original articles · won praise 8 · views 4743

Guess you like

Origin blog.csdn.net/qq_41223538/article/details/103680544