The stdDeviation
attribute defines the standard deviation for the blur operation.
Only one element is using this attribute: <feGaussianBlur>
html, body, svg { height: 100%; }
<svg viewBox="0 0 480 200" xmlns="http://www.w3.org/2000/svg"> <filter id="gaussianBlur1"> <feGaussianBlur stdDeviation="1" /> </filter> <filter id="gaussianBlur2"> <feGaussianBlur stdDeviation="5" /> </filter> <filter id="gaussianBlur3" x="-30%" y="-30%" width="160%" height="160%"> <feGaussianBlur stdDeviation="10" /> </filter> <circle cx="100" cy="100" r="50" style="filter: url(#gaussianBlur1);" /> <circle cx="100" cy="100" r="50" style="filter: url(#gaussianBlur2); transform: translateX(140px);" /> <circle cx="100" cy="100" r="50" style="filter: url(#gaussianBlur3); transform: translateX(280px);" /> </svg>
Usage notes
Value | <number-optional-number> |
---|---|
Default value | 0 |
Animatable | Yes |
<number-optional-number>
- If two numbers are provided, the first number represents a standard deviation value along the x-axis. The second value represents a standard deviation along the y-axis. If one number is provided, then that value is used for both X and Y.
A negative value is forbidden. A value of zero disables the effect of the given filter primitive (i.e., the result is the filter input image). IfstdDeviation
is 0 in only one of X or Y, then the effect is that the blur is only applied in the direction that has a non-zero value.
Specifications
Specification | Status | Comment |
---|---|---|
Filter Effects Module Level 1 The definition of 'stdDeviation' in that specification. |
Working Draft | No change |
Scalable Vector Graphics (SVG) 1.1 (Second Edition) The definition of 'stdDeviation' in that specification. |
Recommendation | Initial definition |
Browser compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
stdDeviation | Chrome ? | Edge Full support ≤18 | Firefox Full support 4 | IE ? | Opera Full support 9 | Safari Full support 9.1 | WebView Android ? | Chrome Android ? | Firefox Android Full support Yes | Opera Android ? | Safari iOS ? | Samsung Internet Android ? |
Legend
- Full support
- Full support
- Compatibility unknown
- Compatibility unknown