scss CSS媒体查询

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了scss CSS媒体查询相关的知识,希望对你有一定的参考价值。

/* # Breakpoints

Store and Share all possible breakpoints between projects or modules,
and use them with breakpoint-sass.

[Breakpoint-sass documentation](http://breakpoint-sass.com/)
[Breakpoint Wiki](https://github.com/at-import/breakpoint/wiki)

@state - Draft


Styleguide components.variables.breakpoints
*/

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

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

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

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

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

/* iPads (portrait) ----------- */
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation : portrait) {
/* STYLES GO HERE */
}

/* Desktops and laptops ----------- */
@media only screen
and (min-width : 1224px) {
/* STYLES GO HERE */
}

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

/* iPhone 5 (portrait & landscape)----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 568px) {
/* STYLES GO HERE */
}

/* iPhone 5 (landscape)----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 568px)
and (orientation : landscape) {
/* STYLES GO HERE */
}

/* iPhone 5 (portrait)----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 568px)
and (orientation : portrait) {
/* STYLES GO HERE */
}

以上是关于scss CSS媒体查询的主要内容,如果未能解决你的问题,请参考以下文章

scss CSS媒体查询

scss CSS:媒体查询

SCSS 媒体查询纵横比不起作用

CSS/SASS:媒体查询没有被读取/看到[重复]

如何在 CSS 3 媒体查询中使用 SASS 逻辑 [重复]

scss Bootstrap 3 SCSS媒体查询