- HTML中文网
- 联系QQ:88526
- QQ交流群

- 微信公众号

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> <head> <meta charset="utf-8" /> <title></title> <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> <h1>描边的文字:</h1> <p>我是被描了2像素黄边的文字</p> </div> </body> </html>
点击 "运行实例" 按钮查看在线实例
效果图:
推荐手册