欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  web前端

关于一个Body全局样式不解的地方?_html/css_WEB-ITnose

程序员文章站 2022-04-26 07:57:01
...
移动Web页面的一段CSS样式,有些地方不是太解。

body {
font: 16px/2 'Helvetica Neue', Helvetica, STHeiti, 'Hiragino Sans GB', sans-serif;
color: #ccc;
-webkit-text-size-adjust: 100%;
text-size-adjust: 100%;
text-transform: none;
speak: none;

-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
background: #f2f2f2;
}

问题:
text-transform: none;默认值也为none。写在这里貌似没什么太大的意思??? 为什么还要写???

“speak: none;"取消发音,具体作用是什么??? 为什么要写这个样式属性???


回复讨论(解决方案)

有大神知道这两个属性是怎么回事么???

移动端写这些也正常啊.

估计是外层有默认赋值,,,,这里进行了还原。。。。

估计是外层有默认赋值,,,,这里进行了还原。。。。


+1应该是。

网上查了一下speak: The speak property defines whether text should be rendered aurally and if so, how. 应该是实验阶段吧,基本没什么用。

Characteristics
Possible values
none
Suppresses aural rendering so that the element requires no time to speak. Note, however, that descendants may override this value and cause the element to be spoken. To ensure descendants do not override, use the display property. Note also the difference between an element whose volume property has a value of silent and an element whose speak property has the value none. If the volume property is silent, although no sound is generated, rendering the text takes up as much time as if the text were being spoken, including any pauses before and after the element. The resulting silence can be used in language teaching applications, for example, where the pause that is generated allows pupils sufficient time to speak out loud a word or phrase.
normal
Uses language-dependent pronunciation rules for rendering an element and its children.
spell-out
Spells the text one letter at a time (useful for acronyms and abbreviations).
inherit
Use the same computed value as the parent element for this property.
Default value
normal

Applies to
All elements

Inherited
Yes