아랄라랄라
R 스토리
아랄라랄라
전체 방문자
오늘
어제
  • All (199)
    • Web (145)
      • Markup | WEB (9)
      • Styles (45)
      • javascript (32)
      • jquery (28)
      • vue (16)
      • react (10)
      • more (5)
    • IT (32)
      • CS (3)
      • git hub (5)
      • UI | UX (18)
      • more (6)
    • ETC (22)
      • 이슈노트 (12)
      • 스터디 (10)
      • 아랄라 ☞☜ (0)
      • JOB🛠 (0)

인기 글

반응형
hELLO · Designed By 정상우.
아랄라랄라

R 스토리

Web/Styles

[CSS] 기기별 미디어쿼리

2019. 9. 10. 16:57

디바이스별 미디어 쿼리 정리속성으로 구분

 

/* 스마트폰 (가로/세로): */
@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)">

 






 

/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
##Device = 데스크탑
##Screen = 1281px 이상 해상도 데스크탑
*/

@media (min-width: 1281px) {

//CSS

}

/*
##Device = Laptops, Desktops
##Screen = B/w 1025px to 1280px
##Device = 랩탑, 데스크탑
##Screen = 1025px에서 1280px 사이
*/

@media (min-width: 1025px) and (max-width: 1280px) {

//CSS

}

/*
##Device = Tablets, Ipads (portrait),
##Screen = B/w 768px to 1024px
##Device = 태블릿, 아이패드(세로),
##Screen = 768px에서 1024px 사이
*/

@media (min-width: 768px) and (max-width: 1024px) {

//CSS

}

/*
##Device = Tablets, Ipads (landscape)
##Screen = B/w 768px to 1024px
##Device = 태블릿, 아이패드(가로)
##Screen = 768px에서 1024px 사이
*/

@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {

//CSS

}

/*
##Device = Low Resolution Tablets, Mobiles (Landscape)
##Screen = B/w 481px to 767px
##Device = 저해상도 태블릿, 모바일(가로)
##Screen = 481px에서 767px 사이
*/

@media (min-width: 481px) and (max-width: 767px) {

//CSS

}

/*
##Device = Most of the Smartphones Mobiles (Portrait)
##Screen = B/w 320px to 479px
##Device = 대부분의 스마트폰 모바일 기기(세로)
##Screen = 320px에서 479px 사이
*/

@media (min-width: 320px) and (max-width: 480px) {

//CSS

}
// ##출처: https://gist.github.com/gokulkrishh/242e68d1ee94ad05f488

 

728x90
저작자표시 비영리 (새창열림)

'Web > Styles' 카테고리의 다른 글

[CSS] CSS Framework 종류  (0) 2020.01.02
[CSS3] display: flex 정리  (0) 2019.11.26
[CSS] background-attachment:fixed; parallax에 최적화  (0) 2019.06.12
[SVG] svg stroke animate  (0) 2019.06.10
[SCSS] SCSS 기본 문법 정리  (0) 2018.08.02

티스토리툴바