質問

網膜画面をターゲットにしようとしているメディアクエリに苦しんでいます。 私はこのメディアクエリを得ました。

@media(-webkit-min-device-pixel-ration:2)and (min-resolution:192dpi) {}
.

Chrome Canary DevToolsはスタイルを取得しますが、実際の網膜ディスプレイ上でテストします(この場合はiPhone 5S)。

私はまたこのビューポートを使用してすべてをスケールするので、私はそれを削除しようとしましたが、上記の問題の違いはありませんでした。

<meta name="viewport" content="width=device-width, height=device-height, initial-scale=0.5 maximum-scale=0.5, user-scalable=no target-densitydpi=device-dpi">
.

なぜ私がこの問題を抱えているのかについてのアイデア?

役に立ちましたか?

解決

このメディアクエリを試して、

@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){
   //your css goes here..
}  
.

ビューポートを変更する

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top