CSS媒体查询运算符 [英] CSS media query operators

查看:191
本文介绍了CSS媒体查询运算符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以很简单地向我解释CSS中的运算符andnotonly和逗号,的含义和作用吗?

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技巧

媒体查询级别4:评估媒体查询

这篇关于CSS媒体查询运算符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆