CSS参考手册
扩展 | Extensions
-webkit-text-stroke-width
非标准
此功能是非标准的,不处于标准轨道上.。不要在面向Web的生产站点上使用它:它并不适用于每个用户。实现之间也可能存在很大的不兼容性,而且这种行为在未来可能会发生变化。
该-webkit-text-stroke-width
CSS属性指定的行程为文本的宽度。
初始值 |
0 |
---|---|
适用元素 |
all elements |
是否是继承属性 |
yes |
适用媒体 |
visual |
计算值 |
absolute <length> |
动画类型 |
discrete |
正规顺序 |
the unique non-ambiguous order defined by the formal grammar |
语法
/* Keyword values */
-webkit-text-stroke-width: thin;
-webkit-text-stroke-width: medium;
-webkit-text-stroke-width: thick;
/* <length> values */
-webkit-text-stroke-width: 2px;
-webkit-text-stroke-width: 0.1em;
-webkit-text-stroke-width: 1mm;
-webkit-text-stroke-width: 5pt;
/* Global values */
-webkit-text-stroke-width: inherit;
-webkit-text-stroke-width: initial;
-webkit-text-stroke-width: unset;
值
<line-width>
笔划的宽度。
正式语法
<length>
示例
CSS内容
p {
margin: 0;
font-size: 4em;
-webkit-text-stroke-color: red;
}
#thin {
-webkit-text-stroke-width: thin;
}
#medium {
-webkit-text-stroke-width: 3px;
}
#thick {
-webkit-text-stroke-width: 1.5mm;
}
HTML内容
<p id="thin">Thin stroke</p>
<p id="medium">Medium stroke</p>
<p id="thick">Thick stroke</p>
规范
Specification |
Status |
Comment |
---|---|---|
Web Compatibility StandardThe definition of '-webkit-text-stroke-width' in that specification. |
Living Standard |
Initial standardization |
Safari CSS Reference '-webkit-text-stroke-width' in that document. |
Non-standard unofficial documentation |
Initial documentation |
浏览器兼容性
Feature |
Chrome |
Edge |
Firefox (Gecko) |
Internet Explorer |
Opera |
Safari |
---|---|---|---|---|---|---|
Basic support |
(Yes) |
(Yes) |
48.0 (48.0)1 |
No support |
(Yes) |
(Yes) |
Feature |
Android |
Edge |
Firefox Mobile (Gecko) |
IE Mobile |
Opera Mobile |
Safari Mobile |
---|---|---|---|---|---|---|
Basic support |
? |
(Yes) |
48.0 (48.0)1 |
No support |
? |
? |
扩展 | Extensions相关
层叠样式表( Cascading Style Sheets )是一种用来表现 HTML 或 XML 等文件样式的计算机语言。CSS 不仅可以静态地修饰网页,还可以配合各种脚本语言动态地对网页各元素进行格式化。