最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

iPhoneX 媒體查詢適配的方法教程

 更新時(shí)間:2018年11月29日 15:34:44   作者:杭州蘇小小  
這篇文章主要介紹了iPhoneX 媒體查詢適配的方法教程,小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧

iPhone X尺寸

  • 5.8 英寸
  • 5.65 x 2.79 x 0.30 英寸

iPhone X分辨率

  • 1125 x 2436
  • 每英寸PX~458 像素

屏幕尺寸

Apple iPhone X的屏幕為5.8英寸,約為實(shí)際設(shè)備尺寸的82.9%。Apple iPhone X設(shè)備的物理尺寸為5.65 x 2.79 x 0.30英寸或(143.6 x 70.9 x 7.7 MM)。

單位顯示順序?yàn)椤案選寬x厚”

屏幕像素密度和CSS像素比

“Pixel”是任何顯示器的最小單位/元素。

適合一英寸的像素總數(shù)稱為“屏幕密度”或“像素密度”,其測量為“每英寸像素?cái)?shù)”。
像素深度限制顯示每英寸像素?cái)?shù)取決于不同的屏幕尺寸。當(dāng)每英寸像素?cái)?shù)增加超過屏幕尺寸限制時(shí),顯示分辨率將增加,但實(shí)際設(shè)備寬度/高度(以像素為單位)保持不變。實(shí)際設(shè)備像素稱為設(shè)備無關(guān)像素或CSS像素比。

Apple iPhone X的密度約為458像素,實(shí)際像素密度約為153,因此它具有 3 xxhdpi的顯示像素密度。

屏幕分辨率和視口

在設(shè)備上顯示的像素總和稱為“屏幕分辨率”。并且任何設(shè)備的實(shí)際像素總和被稱為“視口”。

Apple iPhone X的物理屏幕尺寸為5.8英寸,分辨率約為1125 x 2436像素,像素密度約為458 PPI。Apple iPhone X的視口尺寸為375 x 812像素,像素比約為3。

CSS媒體查詢

Apple iPhone X媒體查詢(僅限移動(dòng)設(shè)備)

復(fù)制代碼 代碼如下:
@media only screen and (min-width: 375px) and (max-width: 767px) { /* Your Styles... */ }

Apple iPhone X Min-Width媒體查詢

@media only screen and (min-width: 375px) { /* Your Styles... */ }

Apple iPhone X Min-Height媒體查詢

@media only screen and (min-height: 812px) { /* Your Styles... */ }

Apple iPhone X Landscape媒體查詢

復(fù)制代碼 代碼如下:
@media only screen and (min-width: 812px) and (orientation: landscape) { /* Your Styles... */ }

Apple iPhone X Portrait媒體查詢

復(fù)制代碼 代碼如下:
@media only screen and (min-width: 375px) and (orientation: portrait) { /* Your Styles... */ }

Apple iPhone X Retina媒體查詢

@media
 only screen and (-webkit-min-device-pixel-ratio: 3),
 only screen and ( min--moz-device-pixel-ratio: 3),
 only screen and (  -o-min-device-pixel-ratio: 3/1),
 only screen and (  min-device-pixel-ratio: 3),
 only screen and (    min-resolution: 458dpi),
 only screen and (    min-resolution: 3dppx) { 
 /* Retina styles here */
}

視網(wǎng)膜實(shí)際上是基于設(shè)備像素比率。設(shè)備大多具有2x或3x顯示屏,因此您可以使用一般的視網(wǎng)膜媒體查詢在所有類型的設(shè)備上顯示高分辨率內(nèi)容。Retina 2x和Retina 3x媒體查詢?nèi)缦拢?/p>

Retina 2x媒體查詢

@media
 only screen and (-webkit-min-device-pixel-ratio: 2),
 only screen and ( min--moz-device-pixel-ratio: 2),
 only screen and (  -o-min-device-pixel-ratio: 2/1),
 only screen and (  min-device-pixel-ratio: 2),
 only screen and (    min-resolution: 192dpi),
 only screen and (    min-resolution: 2dppx) { 
 /* Retina styles here */
}

Retina 3x媒體查詢

@media
 only screen and (-webkit-min-device-pixel-ratio: 3),
 only screen and ( min--moz-device-pixel-ratio: 3),
 only screen and (  -o-min-device-pixel-ratio: 3/1),
 only screen and (  min-device-pixel-ratio: 3),
 only screen and (    min-resolution: 384dpi),
 only screen and (    min-resolution: 3dppx) { 
 /* Retina styles here */
}

補(bǔ)充:

/* iphone 3 */

復(fù)制代碼 代碼如下:
@media only screen and (min-device-width: 320px) and (max-device-height: 480px) and (-webkit-device-pixel-ratio: 1) { }

/* iphone 4 */

復(fù)制代碼 代碼如下:
@media only screen and (min-device-width: 320px) and (max-device-height: 480px) and (-webkit-device-pixel-ratio: 2) { }

/* iphone 5 */

復(fù)制代碼 代碼如下:
@media only screen and (min-device-width: 320px) and (max-device-height: 568px) and (-webkit-device-pixel-ratio: 2) { }

/* iphone 6, 6s */

復(fù)制代碼 代碼如下:
@media only screen and (min-device-width: 375px) and (max-device-height: 667px) and (-webkit-device-pixel-ratio: 2) { }

/* iphone 7, 8 */

復(fù)制代碼 代碼如下:
@media only screen and (min-device-width: 375px) and (max-device-height: 667px) and (-webkit-device-pixel-ratio: 2) { }

/* iphone 6+, 6s+, 7+, 8+ */

復(fù)制代碼 代碼如下:
@media only screen and (min-device-width: 414px) and (max-device-height: 736px) and (-webkit-device-pixel-ratio: 3) { }

以上就是本文的全部內(nèi)容,希望對大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

  • iOS swift實(shí)現(xiàn)轉(zhuǎn)場動(dòng)畫的方法示例

    iOS swift實(shí)現(xiàn)轉(zhuǎn)場動(dòng)畫的方法示例

    在平時(shí)的iOS開發(fā)中,我們進(jìn)行界面跳轉(zhuǎn)時(shí)一般都是采用系統(tǒng)默認(rèn)的轉(zhuǎn)場動(dòng)畫,而下面這篇文章主要給大家介紹了關(guān)于iOS利用swift實(shí)現(xiàn)轉(zhuǎn)場動(dòng)畫的方法示例,文中通過示例代碼介紹的非常詳細(xì),需要的朋友可以參考借鑒,下面來一起看看吧。
    2017-07-07
  • iOS獲取當(dāng)前連接的wifi信息

    iOS獲取當(dāng)前連接的wifi信息

    這篇文章主要為大家詳細(xì)介紹了iOS如何獲取當(dāng)前連接的wifi信息,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2018-07-07
  • IOS獲取當(dāng)前版本號(hào) Bundle ID等信息的方法詳解

    IOS獲取當(dāng)前版本號(hào) Bundle ID等信息的方法詳解

    這篇文章主要介紹了IOS獲取當(dāng)前版本號(hào) Bundle ID等信息的方法詳解的相關(guān)資料,需要的朋友可以參考下
    2016-12-12
  • iOS 底層alloc init new 源碼流程示例分析

    iOS 底層alloc init new 源碼流程示例分析

    這篇文章主要為大家介紹了iOS 底層alloc init new 源碼流程示例分析,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪
    2022-12-12
  • 如何在IOS上使用ReplayKit與RTC

    如何在IOS上使用ReplayKit與RTC

    這篇文章主要介紹了如何在IOS上使用ReplayKit 與 RTC,對IOS音視頻感興趣的同學(xué),一定要看一下
    2021-04-04
  • 詳解Xcode 9 設(shè)置 iOS無線真機(jī)調(diào)試

    詳解Xcode 9 設(shè)置 iOS無線真機(jī)調(diào)試

    本篇文章主要介紹了詳解Xcode 9 設(shè)置 iOS無線真機(jī)調(diào)試,小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧
    2017-12-12
  • iOS微信分享后關(guān)閉發(fā)送成功提示并返回應(yīng)用

    iOS微信分享后關(guān)閉發(fā)送成功提示并返回應(yīng)用

    這篇文章主要為大家詳細(xì)介紹了iOS微信分享后關(guān)閉發(fā)送成功提示并返回應(yīng)用的相關(guān)資料,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2016-09-09
  • iOS實(shí)現(xiàn)圓環(huán)比例圖

    iOS實(shí)現(xiàn)圓環(huán)比例圖

    這篇文章主要為大家詳細(xì)介紹了iOS實(shí)現(xiàn)圓環(huán)比例圖,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2020-11-11
  • iOS文件預(yù)覽分享小技能示例

    iOS文件預(yù)覽分享小技能示例

    這篇文章主要為大家介紹了iOS文件預(yù)覽分享小技能示例詳解,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪
    2022-08-08
  • iOS中l(wèi)ebel特殊字符的自動(dòng)換行問題解決

    iOS中l(wèi)ebel特殊字符的自動(dòng)換行問題解決

    這篇文章主要給大家介紹了關(guān)于iOS中l(wèi)ebel特殊字符的實(shí)現(xiàn)不自動(dòng)換行的相關(guān)資料,文中通過示例代碼介紹的非常詳細(xì),對大家學(xué)習(xí)iOS具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧。
    2017-10-10

最新評論

盐源县| 沙河市| 布尔津县| 宝丰县| 枝江市| 达日县| 奈曼旗| 当涂县| 铁岭市| 太和县| 玉田县| 广州市| 肥东县| 台北县| 繁峙县| 大厂| 太仆寺旗| 观塘区| 邹城市| 鱼台县| 精河县| 招远市| 昭苏县| 南通市| 得荣县| 新巴尔虎右旗| 邯郸市| 古田县| 万山特区| 长兴县| 江门市| 长顺县| 望都县| 汝阳县| 南充市| 山阳县| 互助| 丹江口市| 南郑县| 礼泉县| 晋中市|