css CSS响应断点,Media Query断点

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了css CSS响应断点,Media Query断点相关的知识,希望对你有一定的参考价值。

/* Smartphones (portrait and landscape) ----------- */
@media only screen 
and (min-device-width : 320px) 
and (max-device-width : 480px) {
/* Styles */
}

/* Smartphones (landscape) ----------- */
@media only screen 
and (min-width : 321px) {
/* Styles */
}

/* Smartphones (portrait) ----------- */
@media only screen 
and (max-width : 320px) {
/* Styles */
}

/* iPads (portrait and landscape) ----------- */
@media only screen 
and (min-device-width : 768px) 
and (max-device-width : 1024px) {
/* Styles */
}

/* iPads (landscape) ----------- */
@media only screen 
and (min-device-width : 768px) 
and (max-device-width : 1024px) 
and (orientation : landscape) {
/* Styles */
}

/* iPads (portrait) ----------- */
@media only screen 
and (min-device-width : 768px) 
and (max-device-width : 1024px) 
and (orientation : portrait) {
/* Styles */
}
/**********
iPad 3
**********/
@media
only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation : landscape)
and (-webkit-min-device-pixel-ratio : 2) {
/* Styles */
}

@media
only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation : portrait)
and (-webkit-min-device-pixel-ratio : 2) {
/* Styles */
}
/* Desktops and laptops ----------- */
@media only screen 
and (min-width : 1224px) {
/* Styles */
}

/* Large screens ----------- */
@media only screen 
and (min-width : 1824px) {
/* Styles */
}

/* iPhone 4 ----------- */
@media
only screen
and (min-device-width : 320px)
and (max-device-width : 480px)
and (orientation : landscape)
and (-webkit-min-device-pixel-ratio : 2) {
/* Styles */
}

@media
only screen
and (min-device-width : 320px)
and (max-device-width : 480px)
and (orientation : portrait)
and (-webkit-min-device-pixel-ratio : 2) {
/* Styles */
}
- Keywords: xx-small, x-small, small, medium, large, x-large, xx-large
- Short: xxs, xs, sm, md, lg, xlg, xxlg
/* #Media Queries   from foundation.zurb.com
================================================== */

// Small screens
@media only screen { } /* Define mobile styles */

@media only screen and (max-width: 40em) { } /* max-width 640px, mobile-only styles, use when QAing mobile issues */

// Medium screens
@media only screen and (min-width: 40.063em) { } /* min-width 641px, medium screens */

@media only screen and (min-width: 40.063em) and (max-width: 64em) { } /* min-width 641px and max-width 1024px, use when QAing tablet-only issues */

// Large screens
@media only screen and (min-width: 64.063em) { } /* min-width 1025px, large screens */

@media only screen and (min-width: 64.063em) and (max-width: 90em) { } /* min-width 1024px and max-width 1440px, use when QAing large screen-only issues */

// XLarge screens
@media only screen and (min-width: 90.063em) { } /* min-width 1441px, xlarge screens */

@media only screen and (min-width: 90.063em) and (max-width: 120em) { } /* min-width 1441px and max-width 1920px, use when QAing xlarge screen-only issues */

// XXLarge screens
@media only screen and (min-width: 120.063em) { } /* min-width 1921px, xlarge screens */





////////////////////////////////////////////////////////////////////////////

/* #Media Queries   from getskeleton.com
================================================== */

/* Smaller than desktop 1200 (devices and browsers) */

@media (min-width: 960px) and (max-width: 1199px) {}

/* Smaller than standard 960 (devices and browsers) */
@media only screen and (max-width: 959px) {}

/* Tablet Portrait size to standard 960 (devices and browsers) */
@media only screen and (min-width: 768px) and (max-width: 959px) {}

/* All Mobile Sizes (devices and browser) */
@media only screen and (max-width: 767px) {}

/* Mobile Landscape Size to Tablet Portrait (devices and browsers) */
@media only screen and (min-width: 480px) and (max-width: 767px) {}

/* Mobile Portrait Size to Mobile Landscape Size (devices and browsers) */
@media only screen and (max-width: 479px) {}


/////////////////////////////////////////////////////////////////////////

/* #Media Queries   from getbootstrap.com
================================================== */

/* Retina ready */
@media all and (-webkit-min-device-pixel-ratio: 1.5) {
  

 }

/*  xs */
@media (max-width: 767px) { 
  
  }

  
/* sm */
@media (min-width: 768px) and (max-width: 991px) { 
  
  }
 
/* md */
@media (min-width: 992px) and (max-width: 1199px) { 
  
  }


////////////////////////////////////////////////////////////////////////////////

/* Extra small devices (phones, less than 768px) */
@media (max-width: 768px) { 
  
  }
  
/* Small devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991px) { 
  
  }

/* Medium devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199px) { 
  
  }
  
/* Large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) { 
  
  }
/* Large desktops and laptops */
@media (min-width: 1200px) {

}

/* Landscape tablets and medium desktops */
@media (min-width: 992px) and (max-width: 1199px) {

}

/* Portrait tablets and small desktops */
@media (min-width: 768px) and (max-width: 991px) {

}

/* Landscape phones and portrait tablets */
@media (max-width: 767px) {

}

/* Portrait phones and smaller */
@media (max-width: 480px) {

}
/*==================================================
=            Bootstrap 3 Media Queries             =
==================================================*/
 
/*==========  Mobile First Method  ==========*/
 
/* Custom, iPhone Retina */ 
@media only screen and (min-width : 320px) {
    
}
 
/* Extra Small Devices, Phones */ 
@media only screen and (min-width : 480px) {
 
}
 
/* Small Devices, Tablets */
@media only screen and (min-width : 768px) {
 
}
 
/* Medium Devices, Desktops */
@media only screen and (min-width : 992px) {
 
}
 
/* Large Devices, Wide Screens */
@media only screen and (min-width : 1200px) {
 
}
 
 
/*==========  Non-Mobile First Method  ==========*/
 
/* Large Devices, Wide Screens */
@media only screen and (max-width : 1200px) {
 
}
 
/* Medium Devices, Desktops */
@media only screen and (max-width : 992px) {
 
}
 
/* Small Devices, Tablets */
@media only screen and (max-width : 768px) {
 
}
 
/* Extra Small Devices, Phones */ 
@media only screen and (max-width : 480px) {
 
}
 
/* Custom, iPhone Retina */ 
@media only screen and (max-width : 320px) {
    
}

以上是关于css CSS响应断点,Media Query断点的主要内容,如果未能解决你的问题,请参考以下文章

CSS 中@media 查询的标准断点是啥? [关闭]

响应式网站上媒体查询的常见断点

css 响应断点

css Bootstrap的默认响应断点

css Bootstrap的默认响应断点

响应式断点触发的 CSS 过渡