update CSS media feature can be used to test how frequently (if at all) the output device is able to modify the appearance of content.

句法

update feature is specified as a single keyword value chosen from the list below.

none

Once it has been rendered, the layout can no longer be updated. Example: documents printed on paper.

slow

The layout may change dynamically according to the usual rules of CSS, but the output device is not able to render or display changes quickly enough for them to be perceived as a smooth animation. Examples: e-book readers or severely underpowered devices.

fast
The layout may change dynamically according to the usual rules of CSS, and the output device is not unusually constrained in speed, so regularly-updating things like CSS 动画 can be used. Example: computer screens.

范例

HTML

<p>If this text animates for you, you are using a fast-updating device.</p>
					

CSS

@keyframes jiggle {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(25px);
  }
}
@media (update: fast) {
  p {
    animation: 1s jiggle linear alternate infinite;
  }
}
					

结果

规范

规范 状态 注释
Media Queries Level 4
The definition of 'update' in that specification.
候选推荐 初始定义。

浏览器兼容性

The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. 更新 GitHub 上的兼容性数据
Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
update media feature Chrome 不支持 No Edge 不支持 No Firefox 不支持 No IE 不支持 No Opera 不支持 No Safari 不支持 No WebView Android 不支持 No Chrome Android 不支持 No Firefox Android 不支持 No Opera Android 不支持 No Safari iOS 不支持 No Samsung Internet Android 不支持 No

图例

不支持

不支持

元数据

  • 最后修改: