SVG参考手册
分类 | Elements
hatchpath
这是一项实验技术
由于该技术的规格不稳定,请查看各种浏览器的兼容性表格以供使用。另外请注意,随着规范的变化,实验技术的语法和行为在未来版本的浏览器中可能会发生变化。
The <hatchpath>
SVG element defines a hatch path used by the <hatch>
element.
用法上下文
分类 |
没有 |
---|---|
允许的内容 |
任意数量的以下元素,以任何顺序排列:动画元素描述性元素<script>,<style> |
属性
全局属性
- Core attributes
- Global event attributes
- Presentation attributes
- Style attributes
具体属性
d
offset
DOM接口
这个元素实现了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>
结果
产品规格
Specification |
Status |
Comment |
---|---|---|
Scalable Vector Graphics (SVG) 2The definition of '<hatchpath>' in that specification. |
Candidate Recommendation |
Initial definition |
浏览器兼容性
Feature |
Chrome |
Edge |
Firefox (Gecko) |
Internet Explorer |
Opera |
Safari |
---|---|---|---|---|---|---|
Basic support |
No support1 |
No support2 |
No support3 |
No support |
No support1 |
? |
Feature |
Android |
Firefox Mobile (Gecko) |
IE Phone |
Opera Mobile |
Safari Mobile |
---|---|---|---|---|---|
Basic support |
?1 |
No support3 |
No support |
No support |
? |