CSS参考手册
媒体查询 | Media Queries
扫描 | @media.scan
scan
CSS @media
媒体功能可基于扫描处理(如果有的话)通过输出装置利用样式。在这种情况下使用的单词扫描不涉及图像扫描仪,例如用于数字化照片的扫描仪。相反,这意味着将图像绘制到电视屏幕(或其他设备)上的过程。
语法
该scan
功能被指定为从下面的列表中选择的单个关键字值。
interlace
该设备交替地绘制奇数行和偶数行。一些电视机使用隔行扫描。
progressive
该设备依次绘制所有线。所有电脑屏幕都使用逐行扫描。
例子
HTML
<p>If your screen uses interlaced rendering, this text should
be in a sans-serif font. If your screen uses progressive
scanning, you should see a serif font.</p>
CSS
p {
font-family: cursive;
}
@media (scan: interlace) {
p {
font-family: sans-serif;
}
}
@media (scan: progressive) {
p {
font-family: serif;
}
}
结果
规范
Specification |
Status |
Comment |
---|---|---|
Media Queries Level 4The definition of 'scan' in that specification. |
Working Draft |
No change. |
Media QueriesThe definition of 'scan' in that specification. |
Recommendation |
Initial definition. |
浏览器兼容性
Feature |
Chrome |
Firefox (Gecko) |
Internet Explorer |
Opera |
Safari |
---|---|---|---|---|---|
Basic support |
? |
No support |
? |
? |
? |
Feature |
Android |
Firefox Mobile (Gecko) |
IE Mobile |
Opera Mobile |
Safari Mobile |
---|---|---|---|---|---|
Basic support |
? |
No support |
? |
? |
? |
媒体查询 | Media Queries相关
层叠样式表( Cascading Style Sheets )是一种用来表现 HTML 或 XML 等文件样式的计算机语言。CSS 不仅可以静态地修饰网页,还可以配合各种脚本语言动态地对网页各元素进行格式化。