fegaussianblur
<feGaussianBlur>
SVG过滤器原语由在规定的数额模糊输入图像stdDeviation
,它定义了钟形曲线。
用法上下文
分类 | 过滤基元 |
---|---|
允许的内容 | 以任意顺序包含以下任意数量的元素:<animate>,<set> |
属性
全局属性
- Core attributes
- Presentation attributes
- Filter primitive attributes
class
style
具体属性
in
stdDeviation
edgeMode
DOM接口
这个元素实现了SVGFEGaussianBlurElement
接口。
例
Simple example
SVG
<svg width="230" height="120"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<filter id="blurMe">
<feGaussianBlur in="SourceGraphic" stdDeviation="5" />
</filter>
<circle cx="60" cy="60" r="50" fill="green" />
<circle cx="170" cy="60" r="50" fill="green"
filter="url(#blurMe)" />
</svg>
结果
Screenshot | Live sample |
---|---|
| |
后方阴影例子
SVG
<svg width="120" height="120"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<filter id="dropShadow">
<feGaussianBlur in="SourceAlpha" stdDeviation="3" />
<feOffset dx="2" dy="4" />
<feMerge>
<feMergeNode />
<feMergeNode in="SourceGraphic" />
</feMerge>
</filter>
<circle cx="60" cy="60" r="50" fill="green"
filter="url(#dropShadow)" />
</svg>
结果
Screenshot | Live sample |
---|---|
| |
产品规格
Specification | Status | Comment |
---|---|---|
Filter Effects Module Level 1The definition of '<feGaussianBlur>' in that specification. | Working Draft | Added edgeMode attribute |
Scalable Vector Graphics (SVG) 1.1 (Second Edition)The definition of '<feGaussianBlur>' in that specification. | Recommendation | Initial definition |
浏览器兼容性
Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
Basic support | ? | (Yes) | 4.0 (2.0) | ? | 9.0 | 9.1.1 |
Feature | Android | Edge | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | ? | (Yes) | ? | ? | ? | ? |
本文档系腾讯云开发者社区成员共同维护,如有问题请联系 cloudcommunity@tencent.com