speak-as
descriptor specifies how a counter symbol constructed with a given
@counter-style
will be represented in the spoken form. For example, an author can specify a counter symbol to be either spoken as its numerical value or just represented with an audio cue.
/* Keyword values */ speak-as: auto; speak-as: bullets; speak-as: numbers; speak-as: words; speak-as: spell-out; /* @counter-style name value */ speak-as: <counter-style-name>;
auto
speak-as
is specified as
auto
, then the effective value of
speak-as
will be determined based on the value of the
system
descriptor:
system
is
alphabetic
, the effective value of
speak-as
will be
spell-out
.
system
is
cyclic
, the effective value of
speak-as
will be
bullets
.
system
is
extends
, the value of
speak-as
will be the same as if
speak-as: auto
is specified on the extended style.
auto
has the same effect as specifying
speak-as: numbers
.
bullets
numbers
The numerical value of the counter will be read out in the document language.
words
The user agent will generate a counter value as normal and read it out as a word in the document language.
spell-out
speak-as
was
numbers
.
<counter-style-name>
<custom-ident>
. If included, the counter will be spoken out in the form specified in that counter style, kind of like specifying the
fallback
descriptor. If the specified style does not exist,
speak-as
默认为
auto
.
Assistive technology support is very limited for the
speak-as
property. Do not rely on it to convey information critical to understanding the page's purpose.
Let's Talk About Speech CSS | CSS Tricks
| 相关 at-rule |
@counter-style
|
|---|---|
| 初始值 |
auto
|
| 计算值 | 如指定 |
auto | bullets | numbers | words | spell-out | <counter-style-name>where
<counter-style-name> = <custom-ident>
<ul class="list"> <li>One</li> <li>Two</li> <li>Three</li> <li>Four</li> <li>Five</li> </ul>
@counter-style speak-as-example {
system: fixed;
symbols: ;
suffix: " ";
speak-as: numbers;
}
.list {
list-style: speak-as-example;
}
| 规范 | 状态 | 注释 |
|---|---|---|
|
CSS Counter Styles Level 3
The definition of 'speak-as' in that specification. |
候选推荐 | 初始定义。 |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
speak-as
|
Chrome 不支持 No | Edge 不支持 No | Firefox 完整支持 33 | IE 不支持 No | Opera 不支持 No | Safari 不支持 No | WebView Android 不支持 No | Chrome Android 不支持 No | Firefox Android 完整支持 33 | Opera Android 不支持 No | Safari iOS 不支持 No | Samsung Internet Android 不支持 No |
完整支持
不支持
list-style
,
list-style-image
,
list-style-position
symbols()
, the functional notation creating anonymous counter styles.