스마트폰 (가로/세로):
@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)">
출처 : http://firejune.com/1633
'모바일웹' 카테고리의 다른 글
모바일 디바이스 해상도 & 사이즈 (0) | 2013.01.15 |
---|---|
HTML5 enabling script (0) | 2011.06.20 |
jQuery Mobile 페이지 이동 링크 문제 (3) | 2011.04.20 |
모바일용 Doctype 및 mete tag 선언 (0) | 2011.04.06 |
모바일 웹사이트 제작시 필수사항 (0) | 2011.04.05 |