디바이스별 미디어쿼리 정리
모바일 2011. 6. 8. 15:44출처: http://firejune.com/1633
데스크탑 브라우저, iPhone, iPad 모바일 브라우저 등에 스타일시트를 구분하기 위한 미디어 쿼리(Media Queries)를 Andy Clarke씨가 정리했습니다. 속성으로 구분하는 방법과 파일로 구분하는 두가지 방법을 모두 포함합니다.
스마트폰 (가로/세로):
스마트폰 (가로):
스마트폰 (세로):
iPad (가로/세로):
iPad (가로):
iPad (세로):
데스크탑 브라우저 (가로):
큰 모니터:
iPhone4와 같은 높은 해상도:
스마트폰 (가로/세로):
스마트폰 (가로):
스마트폰 (세로):
iPad (가로/세로):
iPad (가로):
iPad (세로):
데스크탑 브라우저 (가로):
큰 모니터:
iPhone4와 같은 높은 해상도:
데스크탑 브라우저, iPhone, iPad 모바일 브라우저 등에 스타일시트를 구분하기 위한 미디어 쿼리(Media Queries)를 Andy Clarke씨가 정리했습니다. 속성으로 구분하는 방법과 파일로 구분하는 두가지 방법을 모두 포함합니다.
속성으로 구분하기
스마트폰 (가로/세로):
@media only screen and (min-device-width : 320px) and (max-device-width : 480px) {
/* Styles */
}
스마트폰 (가로):
@media only screen and (min-width : 321px) {
/* Styles */
}
스마트폰 (세로):
@media only screen and (max-width : 320px) {
/* Styles */
}
iPad (가로/세로):
@media only screen and
(min-device-width : 768px) and (max-device-width : 1024px) {
/* Styles */
}
iPad (가로):
@media only screen and
(min-device-width : 768px) and (max-device-width : 1024px) and (orientation : landscape) {
/* Styles */
}
iPad (세로):
@media only screen and
(min-device-width : 768px) and (max-device-width : 1024px) and (orientation : portrait) {
/* Styles */
}
데스크탑 브라우저 (가로):
@media only screen and (min-width : 1224px) {
/* Styles */
}
큰 모니터:
@media only screen and (min-width : 1824px) {
/* Styles */
}
iPhone4와 같은 높은 해상도:
@media
only screen and (-webkit-min-device-pixel-ratio : 1.5),
only screen and (min-device-pixel-ratio : 1.5) {
/* Styles */
}
파일로 구분하기
스마트폰 (가로/세로):
<link rel="stylesheet" href="smartphone.css"
media="only screen and (min-device-width : 320px) and (max-device-width : 480px)">
스마트폰 (가로):
<link rel="stylesheet" href="smartphone-landscape.css"
media="only screen and (min-width : 321px)">
스마트폰 (세로):
<link rel="stylesheet" href="smartphone-portrait.css"
media="only screen and (max-width : 320px)">
iPad (가로/세로):
<link rel="stylesheet" href="ipad.css"
media="only screen and (min-device-width : 768px) and (max-device-width : 1024px)">
iPad (가로):
<link rel="stylesheet" href="ipad-landscape.css"
media="only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : landscape)">
iPad (세로):
<link rel="stylesheet" href="ipad-portrait.css"
media="only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : portrait)">
데스크탑 브라우저 (가로):
<link rel="stylesheet" href="widescreen.css"
media="only screen and (min-width : 1224px)">
큰 모니터:
<link rel="stylesheet" href="widescreen.css"
media="only screen and (min-width : 1824px)">
iPhone4와 같은 높은 해상도:
<link rel="stylesheet" href="iphone4.css"
media="only screen and (-webkit-min-device-pixel-ratio : 1.5), only screen and (min-device-pixel-ratio : 1.5)">
'모바일' 카테고리의 다른 글
[팁/테크] 윈도우 7 폰을 위한 UI 디자인 툴 - 위트 스튜디오 코디네이터 (0) | 2011.06.20 |
---|---|
max-width: 100%; 에 대한 고찰 (0) | 2011.06.08 |
모바일 웹, 아이폰 사파리에서 화면회전시 폰트 확대방지 (0) | 2011.06.08 |
자바스크립트를 활용한 모바일 웹 구현 (0) | 2011.06.07 |
모바일 코딩 (0) | 2011.05.27 |