CSS媒体查询运算符 [英] CSS media query operators
问题描述
有人可以很简单地向我解释CSS中的运算符and
,not
,only
和逗号,
的含义和作用吗?
Can some one explain to me in very simple terms what the operators and
, not
, only
and the comma ,
mean and do in CSS?
推荐答案
这四个运算符实现集合论逻辑.在这种情况下,这就是每个人的意思:
The four operators implement set theory logic. In that context, here is what each one means:
-
,
:等同于'union';例如@media screen, print
与屏幕或打印设备匹配
,
: equivalent of 'union'; e.g.@media screen, print
matches a screen or print device
and
:等同于交集";例如@media screen and (min-device-width: 1920px)
匹配分辨率为1920px的屏幕设备
and
: equivalent of 'intersection'; e.g. @media screen and (min-device-width: 1920px)
matches a screen device with 1920px resolution
not
:等同于设置差异";例如@media not screen and (color)
与非屏幕且支持颜色的设备匹配
not
: equivalent of 'set difference'; e.g. @media not screen and (color)
matches a device which is not a screen and supports color
only
:等效于适当的超集";例如@media only screen and (color)
与仅屏幕且仅支持颜色的设备匹配
only
: equivalent of a 'proper superset'; e.g. @media only screen and (color)
matches a device which is only a screen and only supports color
参考
这篇关于CSS媒体查询运算符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!