適配各種pc屏幕尺寸(媒體查詢)
然后利用rem單位來編寫頁面,就能完美適配各種pc屏幕 ...
使用media的時候需要先設置 lt meta gt 標簽來兼容移動設備的展示。 lt meta name viewport content width device width,height device height,initial scale . , minimum scale . , maximum scale . , user scalable no gt width device w ...
2017-11-01 16:13 0 1311 推薦指數:
然后利用rem單位來編寫頁面,就能完美適配各種pc屏幕 ...
主要用於移動端內容適配,由於移動端有時候需要根據高度來進行適配,比如iPhone4和iPhone5的寬度一樣,但是高度不同 /*iphone4*/ @media only screen and (max-width: 320px) and (max-width: 480px) { html ...
@media screen and (min-width: 320px) { html { font-size: 8.5333 ...
移動端媒體查詢的一些尺寸參考 /*iphone4 4s*/ @media only screen and (device-height :480px) and (-webkit-device-pixel-ratio:2){ /* Styles */ } @media screen ...
該媒體查詢適配規則是以UI設計圖750p寬度為版本的,比如PS量的是450px,在書寫時寫 (450rem/2/15). ...
...