:playing
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
:playing
CSS 伪类选择器表示一个处于“播放”状态的可播放元素,例如 <audio>
或 <video>
。
如果用户明确地启动了播放,那么资源就被认为是正在播放。如果元素的确处于播放状态,但由于与用户意图无关的原因而被暂停,也被认为是正在播放。在这种情况下,一旦底层原因(如“缓冲”或“停滞”状态)得到解决,播放将自动恢复。
语法
css
:playing {
/* ... */
}
示例
CSS
css
:playing {
border: 5px solid green;
}
规范
Specification |
---|
Selectors Level 4 # selectordef-playing |
HTML # selector-playing |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
:playing |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- See implementation notes.
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.