<hatchpath>

Experimental: 这是 实验性技术
检查 浏览器兼容性表格 要小心谨慎在生产中使用这之前。

<hatchpath> SVG element defines a hatch path used by the <hatch> 元素。

Usage context

类别 None
准许内容 Any number of the following elements, in any order:
Animation elements
Descriptive elements
<script> , <style>

属性

全局属性

Specific attributes

DOM Interface

This element implements the SVGHatchpathElement 接口。

范例

SVG

<svg width="200" height="200" xmlns="http://www.w3.org/2000/svg">



<

defs


>





<

hatch


id



=


"

hatch

"



hatchUnits



=


"

userSpaceOnUse

"



pitch



=


"

5

"



rotate



=


"

135

"



>





<

hatchpath


stroke



=


"

#a080ff

"



stroke-width



=


"

2

"



/>





</

hatch


>





</

defs


>





<

rect


fill



=


"

url(#hatch)

"



stroke



=


"

black

"



stroke-width



=


"

2

"



x



=


"

10%

"



y



=


"

10%

"



width



=


"

80%

"



height



=


"

80%

"



/>





</

svg


>



						

结果

浏览器兼容性

BCD tables only load in the browser

另请参阅

Found a problem with this page?

最后修改: , 由 MDN 贡献者