iPhone 6 및 4를 사용하여 다른 스타일 시트가 적용되고 있는지 확인했습니다. 그렇지 않았습니다. 내 스타일 시트는 다음과 같습니다.왜이 미디어 쿼리가 내 iPhone에서 작동하지 않습니까?
<link rel="stylesheet" media="screen and (max-width: 800px)" href="mobileindex.css">
<link rel="stylesheet" media="screen and (min-width: 1100px)" href="desktopindex.css">
예, 간격이 있습니다. 그 공간은 나중에 태블릿을위한 공간입니다. 어떤 이유로 mobileindex.css가 해당 설정에 적용되지 않았습니다. 나는 오리엔테이션을 두 번 바꿔야한다. 그러나이 문제는 다음과 같이 수정됩니다.
<link rel="stylesheet" media="screen and (max-width: 1000px)" href="mobileindex.css">
<link rel="stylesheet" media="screen and (min-width: 1100px)" href="desktopindex.css">
iPhone 4 및 6의 경우 800px로 충분하지 않습니까? 지금 어떻게 작동합니까? 이 문제가 발생한 페이지는 msolonko.net입니다.
는'최대-장치 width'와'분-장치 width'를 사용하여 시도 적이 있습니까? [CSS-Tricks] (https://css-tricks.com/snippets/css/media-queries-for-standard-devices/)에 따르면, 이것이 바로 iPhone을위한 방법입니다. –
@ MarkLanger 그게 효과가있다. 너비 만 사용했을 때 어제까지 작동했고 스타일 시트가 보이지 않기 시작했습니다. –