text-stroke-color
语法
- text-stroke-color:<color>
- 默认值:采用文本颜色
- 适用于:所有元素
- 继承性:有
- 动画性:是
- 计算值:指定值
取值
- <color>:指定文字的描边颜色。
说明
设置或检索对象中的文字的描边颜色
- 对应的脚本特性为textStrokeColor。
兼容性
Values | IE | Firefox | Chrome | Safari | Opera | iOS Safari | Android Browser | Android Chrome |
---|---|---|---|---|---|---|---|---|
Basic Support | 6.0-11.0 | 2.0-40.0 | 4.0-45.0-webkit- | 4.0-8.0-webkit- | 15.0-29.0-webkit- | 4.0-8.3-webkit- | 2.1-4.4.4-webkit- | 18.0-42.0-webkit- |
示例
<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
<style>
html,body{font:bold 14px/1.5 georgia,simsun,sans-serif;text-align:center;}
.stroke h1{margin:0;padding:10px 0 0;}
.stroke p{
margin:50px auto 100px;font-size:100px;
-webkit-text-stroke-width:2px;
-webkit-text-stroke-color:#ff0;
}
.copyright,.info{font-style:italic;}
</style>
</head>
<body>
<div class="stroke">
<h1>描边的文字:</h1>
<p>我是被描了2像素黄边的文字</p>
</div>
</body>
</html>