fegaussianblur

<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>

结果

ScreenshotLive 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>

结果

ScreenshotLive sample

产品规格

SpecificationStatusComment
Filter Effects Module Level 1The definition of '<feGaussianBlur>' in that specification.Working DraftAdded edgeMode attribute
Scalable Vector Graphics (SVG) 1.1 (Second Edition)The definition of '<feGaussianBlur>' in that specification.RecommendationInitial definition

浏览器兼容性

FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support?(Yes)4.0 (2.0)?9.09.1.1

FeatureAndroidEdgeFirefox Mobile (Gecko)IE PhoneOpera MobileSafari Mobile
Basic support?(Yes)????