SVG参考手册
分类 | Elements
feturbulence
<feTurbulence>
SVG滤波器原始创建使用图像Perlin的湍流功能。它可以合成像云彩或大理石这样的人造纹理。生成的图像将填充整个滤镜原始分区。
用法上下文
分类 |
过滤基元 |
---|---|
允许的内容 |
以任意顺序包含以下任意数量的元素:<animate>,<set> |
属性
全局属性
- Core attributes
- Presentation attributes
- Filter primitive attributes
class
style
具体属性
baseFrequency
numOctaves
seed
stitchTiles
type
DOM接口
这个元素实现了SVGFETurbulenceElement
接口。
例
<svg width="200" height="200" viewBox="0 0 220 220"
xmlns="http://www.w3.org/2000/svg">
<filter id="displacementFilter">
<feTurbulence type="turbulence" baseFrequency="0.05"
numOctaves="2" result="turbulence"/>
<feDisplacementMap in2="turbulence" in="SourceGraphic"
scale="50" xChannelSelector="R" yChannelSelector="G"/>
</filter>
<circle cx="100" cy="100" r="100"
style="filter: url(#displacementFilter)"/>
</svg>
产品规格
Specification |
Status |
Comment |
---|---|---|
Filter Effects Module Level 1The definition of '<feTurbulence>' in that specification. |
Working Draft |
No change |
Scalable Vector Graphics (SVG) 1.1 (Second Edition)The definition of '<feTurbulence>' in that specification. |
Recommendation |
Initial definition |
浏览器兼容性
Feature |
Chrome |
Edge |
Firefox (Gecko) |
Internet Explorer |
Opera |
Safari |
---|---|---|---|---|---|---|
Basic support |
? |
(Yes)1 |
4.0 (2.0) |
(Yes)1 |
9.0 |
? |
Feature |
Android |
Edge |
Firefox Mobile (Gecko) |
IE Phone |
Opera Mobile |
Safari Mobile |
---|---|---|---|---|---|---|
Basic support |
? |
(Yes) |
? |
? |
? |
? |