響應式網站佈局要適應的當下主流手機屏幕的各個版本的分辨率有哪些(media query)


CSS寬有14種:web

320、360、37五、38四、400、41四、53三、600、76八、800、85三、102四、1280、1366iphone

CSS高有16種:spa

360、480、53三、56八、56九、600、640、66七、720、73六、76八、800、85三、960、102四、1280ip

考慮到屏幕可能變爲豎屏,那麼綜合一下共20種:it

320、360、37五、38四、400、41四、480、53三、56八、600、640、66七、720、73六、76八、800、85三、85三、960、102四、1280、1366io

劃分一下,大體是:table

第一檔在小屏幕手機:320~411
第二檔在note/pad:400~900 
第三檔在桌面端:960~ 
在實際項目中統計的結果代表,手機屏幕的寬度中的95%還在320~411寬。保證手機版畫面主體內容在320寬內便可。class

 

 

 

 


/@media (device-height:568px) and (-webkit-min-device-pixel-ratio:2){/* 兼容iphone5 */}
webkit

@media only screen and (max-device-width :480px){ } 統計

@media only screen and (min-device-width :481px){ }

 

/*6*/

@media (min-device-width : 375px) and (max-device-width : 667px) and (-webkit-min-device-pixel-ratio : 2){ }

 

/*6+*/

@media (min-device-width : 414px) and (max-device-width : 736px) and (-webkit-min-device-pixel-ratio : 3){ }

 

/*魅族*/

@media only screen and (min-device-width :1080px) and (-webkit-min-device-pixel-ratio : 2.5){ }

 

 

/*mate7*/

@media only screen and (min-device-width :1080px) and (-webkit-min-device-pixel-ratio : 3){ }

 

 

/*4 4s*/

@media only screen and (device-height :480px) and (-webkit-device-pixel-ratio:2){ }

@media screen and (min-width: 320px) and (max-width: 480px) { }

 

 

/* 平板之類的寬度 1024 如下設備 */

@media only screen and (min-width: 321px) and (max-width: 1024px) { body { background: blue; } }

 

/* PC客戶端或大屏幕設備: 1028px 至更大 */

@media only screen and (min-width: 1029px) { body { background: green; } }

 

 

/* 豎屏 */

@media screen and (orientation:portrait) and (max-width: 720px) {對應樣式}

 

 

/* 橫屏 */

@media screen and (orientation:landscape){對應樣式}

 

 

 

 

 

 

 

 

分界點(dp)

手機/平板電腦豎屏

手機/平板電腦橫屏

屏幕

列數

間隔寬度(dp)

0

small handset

 

超小

4

16

360

medium handset

 

超小

4

16

400

large handset

 

超小

4

16

480

large handset

small handset

超小

4

16

600

small tablet

medium handset

8

16/24*

720

large tablet

large handset

8

16/24*

840

large tablet

large handset

12

16/24*

960

 

small tablet

12

24

1024**

 

large tablet

中等

12

24

1280**

 

large tablet

中等

12

24

1440**

   

12

24

1600**

   

12

24

1920**

   

超大

12

24

相關文章
相關標籤/搜索