首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

stroke

stroke属性定义给定图形元素上轮廓的颜色。该stroke属性的默认值是none。

用法说明

分类

呈现属性

<paint>,context-fill,context-stroke

动画

规范性文件

SVG 1.1(第二版)

例子

带stroke的SVG线

示例1:使用笔画绘制绿直线。

代码语言:javascript
复制
<svg height="50" width="300">
    <path stroke="green" d="M5 20 1215 0" />
</svg>

示例2:使用描边绘制带蓝色边框的黑色圆圈。

代码语言:javascript
复制
??<svg height="100" width="100">
    <circle cx="50" cy="50" r="40" stroke="blue" stroke-width="2" fill="black" />
</svg>

运用 context-stroke

有关使用非标准和限制context-stroke(和context-fill)值的信息,请参阅该-moz-context-properties属性的文档。

元素

The following elements can use the stroke attribute

  • Shape elements ?
  • Text content elements ?

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com