css – 什么是没有媒体类型的@media规则?

前端之家收集整理的这篇文章主要介绍了css – 什么是没有媒体类型的@media规则?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我继承了这个,并想知道没有“媒体类型”的媒体查询是做什么的?
@media (min-width: 768px) {
   .commentlist-item .commentlist-item {
    padding: 0 0 0 2em;
   }
}

标准语法符合www.w3schools.com/css/css3_mediaqueries.asp

@media not|only mediatype and (expressions) {
    css-Code;
}

@R_502_323@

If the media type is not explicitly given it is all. ~ 07000

换句话说,没有媒体类型的@media规则是简写语法,其中所有都是隐含的.

更多来自规范:

07001

A shorthand Syntax is offered for media queries that apply to all
media types; the keyword all can be left out (along with the
trailing and). I.e. if the media type is not explicitly given it is
all.

EXAMPLE 5

I.e. these are identical:

06000

As are these:

06001

EXAMPLE 7

I.e. these are equivalent:

06002

source: 07002

猜你在找的CSS相关文章