Movatterモバイル変換


[0]ホーム

URL:


  1. 面向开发者的 Web 技术
  2. CSS:层叠样式表
  3. CSS 参考
  4. 选择器
  5. :volume-locked

此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。

View in EnglishAlways switch to English

:volume-locked

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

:volume-lockedCSS伪类选择器表示能够发出声音,但其音量目前被用户“锁定”的媒体元素,如<audio><video>

用户代理可能根据用户偏好设置媒体的mutedvolume 值(例如,在会话之间记住上次设置的值、基于每个网站的设置,或者其他方式)。被标记为:volume-locked 的元素无法通过 JavaScript 静音、取消静音或更改音量。锁定状态是操作系统或用户代理的首选项。

语法

css
:volume-locked {  /* ... */}

示例

CSS

css
:volume-locked {  border: 5px solid green;}video:volume-locked {  border: 5px solid aqua;}

规范

Specification
Selectors Level 4
# selectordef-volume-locked
HTML
# selector-volume-locked

浏览器兼容性

参见

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2026 Movatter.jp