다른 장치 픽셀 비율을 사용하는 장치에서 미디어 쿼리가 제대로 작동하도록 노력했습니다. 메뉴에서 Nexus S를 선택하면 환상적입니다.
메뉴에서 Nexus 4를 선택하면 게재 위치가 꺼집니다. 크롬 개발 도구에서
내가 넥서스 S에 대한 계산 된 스타일 넥서스 4Phonegap 내의 Android 용 장치 픽셀 비율 조정 관련 문제
(-webkit-max-device-pixel-ratio: 1)
것을 볼 :
@media only screen and (orientation:landscape) and (-webkit-max-device-pixel-ratio: 1.5){
.txt{
top: 170px;
left: 150px;
position:absolute;
font-size:60px;
}
}
@media only screen and (orientation:landscape) and (-webkit-max-device-pixel-ratio: 3) and(-webkit-min-device-pixel-ratio: 2){
.txt{
top: 270px;
left: 200px;
position:absolute;
font-size:60px;
}
}
:
이
(-webkit-max-device-pixel-ratio: 1.5)
내 CSS한다
그리고 이것은 내 메타 뷰포트 태그입니다 :
<meta name="viewport" content="width=device-width; initial-scale=1; maximum-scale=1; user-scalable=0;"/>
나는 테스트를 위해 emulate.phonegap.com (AKA Ripple)을 사용합니다.
그럼 뭐가 궁금한가요? –
Nexus 4는 실제 DPR이 2 일 때 왜 (-webkit-max-device-pixel-ratio : 1.5)를 사용합니까? – shortnamed
Hm -max 접두어가 지원되는지 확실하지 않습니다. http://bjango.com/articles/min-device-pixel-ratio/ 나만 볼 분 –