why doesn't the viewport meta constant device-width return 1536 pixels for the ipad 3 instead of 768 pixels?

StackOverflow https://stackoverflow.com/questions/15956964

문제

I don't understand how else you can let each device figure out how a page is displayed on the screen, across all devices, if it just returns the same width as the older ipads that have a smaller pixel density. how is the ipad 3 supposed to know how to display the page with just the viewport meta tag?

도움이 되었습니까?

해결책

window.devicePixelRatio should be set to 2 on retina devices; in Apple terms the width supplied is the width of the screen in points rather than pixels and then the pixel ratio tells you how many pixels there are per point.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top