您尚未登录,无法添加相关文章。 - 登录

新用户?

哎呀,出了点小问题,您可以稍后重试!

未填写内容或格式不正确!

CSS3 speech使用参考指南

浏览:9066

相关技术文章博览

我要添加++

基础知识(取自腾讯ISD Webteam CSS3中文手册)

语法/取值:
属性 取值 默认值
voice-volume <number> | <percentage> | silent | x-soft | soft | medium | loud | x-loud | inherit medium
voice-balance <number> | left | center | right | leftwards | rightwards | inherit center
speak none | normal | spell-out | digits | literal-punctuation | no-punctuation | inherit normal
pause-before, pause-after <time> | none | x-weak | weak | medium | strong | x-strong | inherit implementation dependent
pause [ <'pause-before'> || <'pause-after'> ] | inherit implementation dependent
rest-before, rest-after <time> | none | x-weak | weak | medium | strong | x-strong | inherit implementation dependent
rest [ <'rest-before'> || <'rest-after'> ] | inherit implementation dependent
cue-before, cue-after <uri> [<number> | <percentage> | silent | x-soft | soft | medium | loud | x-loud] | none | inherit none
cue [ <'cue-before'> || <'cue-after'> ] | inherit not defined for shorthand properties
mark-before, mark-after <string> none
mark [ <'mark-before'> || <'mark-after'> ] not defined for shorthand properties
voice-family [[<specific-voice> | [<age>] <generic-voice>] [<number>],]* [<specific-voice> | [<age>] <generic-voice>] [<number>] | inherit implementation dependent
voice-rate <percentage> | x-slow | slow | medium | fast | x-fast | inherit implementation dependent
voice-pitch <number> | <percentage> | x-low | low | medium | high | x-high | inherit medium
voice-pitch-range <number> | x-low | low | medium | high | x-high | inherit implementation dependent
voice-stress strong | moderate | none | reduced | inherit moderate
voice-duration <time> implementation dependent
phonemes <string> implementation dependent
说明:

规定哪一块可以让机器来阅读。

voice-volume:
设置音量
voice-balance:
设置声音平衡
speak:
设置阅读类型
pause-before, pause-after:
设置暂停时的效果
pause:
设置暂停
rest-before, rest-after:
设置休止时的效果
rest:
设置休止
cue-before, cue-after:
设置提示时的效果
cue:
设置提示
mark-before, mark-after:
设置标注时的效果
mark:
设置标注
voice-family:
设置语系
voice-rate:
设置比率
voice-pitch:
设置音调
voice-pitch-range:
设置音调范围
voice-stress:
设置重音
voice-duration:
设置音乐持续时间
phonemes:
设置音位
兼容性:
类型 IEInternet Explorer FirefoxFirefox ChromeChrome OperaOpera SafariSafari
版本 (×)IE6 (×)Firefox 2.0 (×)Chrome 1.0.x (√)Opera 9.63 (×)Safari 3.1
(×)IE7 (×)Firefox 3.0 (×)Chrome 2.0.x (×)Safari 4
(×)IE8
 

代码与实例

CSS代码:
#speech-sample {voice-family: male;}
#voice-volume {-xv-voice-volume: x-soft; -xv-voice-balance: right;}
#voice-balance {-xv-voice-balance: left;}
#speech-cue {cue-after: url(img/ding.wav);}
#voice-rate {-xv-voice-rate: x-slow;}
#voice-family {voice-family: female;}
#voice-pitch {-xv-voice-pitch: x-low;}
#speech-speak {speak: spell-out;}
                
HTML代码:
<div id="speech-sample">测试下面一些CSS属性,有:<span id="voice-volume">voice-volume,</span> <span id="voice-balance">voice-balance,</span> <span id="voice-rate">voice-rate,</span> <span id="voice-family">voice-family,</span> <span id="voice-pitch">voice-pitch,</span> <span id="speech-speak">speak</span> 以及 <span id="speech-cue">cue-after.</span></div>
</div>

                
效果截图
暂无截图……
查看demo原页面>>

拓展知识点(由各前端同仁提供)

尚未添加拓展知识点!我来添加++
图片地址是:取消
插入:

我要分享

分享到:1