CARVIEW |
Select Language
HTTP/2 200
x-guploader-uploadid: AAwnv3LhwBhANKIMGEV1GCcIL4efQXbVmyVRFERJUhLKZV_BZ_KhZxblSB0nq-dUblZfrhfb
x-goog-generation: 1760058710896212
x-goog-metageneration: 1
x-goog-stored-content-encoding: identity
x-goog-stored-content-length: 277592
x-goog-meta-goog-reserved-file-mtime: 1760056939
x-goog-hash: crc32c=IGpjEg==, md5=0pE4cDhRNF2QuP86q30u+w==
x-goog-storage-class: STANDARD
accept-ranges: none
expires: Sat, 11 Oct 2025 16:50:25 GMT
cache-control: public, max-age=3600
last-modified: Fri, 10 Oct 2025 01:11:51 GMT
etag: W/"d29138703851345d90b8ff3aab7d2efb"
content-type: text/html
age: 0
alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
alt-svc: clear
referrer-policy: strict-origin-when-cross-origin
x-content-type-options: nosniff
strict-transport-security: max-age=63072000
content-security-policy: default-src 'self'; script-src 'report-sample' 'self' 'wasm-unsafe-eval' https://www.google-analytics.com/analytics.js https://www.googletagmanager.com/gtag/js assets.codepen.io production-assets.codepen.io https://js.stripe.com 'sha256-XNBp89FG76amD8BqrJzyflxOF9PaWPqPqvJfKZPCv7M=' 'sha256-YCNoU9DNiinACbd8n6UPyB/8vj0kXvhkOni9/06SuYw=' 'sha256-PZjP7OR6mBEtnvXIZfCZ5PuOlxoDF1LDZL8aj8c42rw='; script-src-elem 'report-sample' 'self' 'wasm-unsafe-eval' https://www.google-analytics.com/analytics.js https://www.googletagmanager.com/gtag/js assets.codepen.io production-assets.codepen.io https://js.stripe.com 'sha256-XNBp89FG76amD8BqrJzyflxOF9PaWPqPqvJfKZPCv7M=' 'sha256-YCNoU9DNiinACbd8n6UPyB/8vj0kXvhkOni9/06SuYw=' 'sha256-PZjP7OR6mBEtnvXIZfCZ5PuOlxoDF1LDZL8aj8c42rw='; style-src 'report-sample' 'self' 'unsafe-inline'; object-src 'none'; base-uri 'self'; connect-src 'self' developer.allizom.org bcd.developer.allizom.org bcd.developer.mozilla.org updates.developer.allizom.org updates.developer.mozilla.org https://*.google-analytics.com https://*.analytics.google.com https://*.googletagmanager.com https://incoming.telemetry.mozilla.org https://observatory-api.mdn.allizom.net https://observatory-api.mdn.mozilla.net https://api.github.com/search/issues stats.g.doubleclick.net https://api.stripe.com; font-src 'self'; frame-src 'self' interactive-examples.mdn.mozilla.net interactive-examples.mdn.allizom.net mdn.github.io live-samples.mdn.mozilla.net live-samples.mdn.allizom.net *.mdnplay.dev *.mdnyalp.dev *.play.test.mdn.allizom.net https://v2.scrimba.com https://scrimba.com jsfiddle.net www.youtube-nocookie.com codepen.io survey.alchemer.com https://js.stripe.com; img-src 'self' data: *.githubusercontent.com *.googleusercontent.com *.gravatar.com mozillausercontent.com firefoxusercontent.com profile.stage.mozaws.net profile.accounts.firefox.com developer.mozilla.org mdn.dev interactive-examples.mdn.mozilla.net interactive-examples.mdn.allizom.net wikipedia.org upload.wikimedia.org https://mdn.github.io/shared-assets/ https://mdn.dev/ https://*.google-analytics.com https://*.googletagmanager.com www.gstatic.com; manifest-src 'self'; media-src 'self' archive.org videos.cdn.mozilla.net https://mdn.github.io/shared-assets/; child-src 'self'; worker-src 'self';
x-frame-options: DENY
origin-trial: AxVILwizhbMjxFeHOn1P3R8niO1RJY/smaK4B4d1rLzc1gTaxtXMSaTi+FoigYgCw40uFRDwFcEAeqDR+vVLOW4AAABfeyJvcmlnaW4iOiJodHRwczovL2RldmVsb3Blci5tb3ppbGxhLm9yZyIsImZlYXR1cmUiOiJQcml2YXRlQXR0cmlidXRpb25WMiIsImV4cGlyeSI6MTc0MjA3OTYwMH0=
x-cloud-trace-context: d8683c0fa777c2fbc44e138d62e76d00
date: Sat, 11 Oct 2025 15:50:25 GMT
server: Google Frontend
via: 1.1 google
vary: Accept-Encoding
content-encoding: gzip
x-cache: miss
blur() - CSS: カスケーディングスタイルシート | MDN
Toggle sidebar
>
このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。
blur()
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2016年9月.
blur()
は CSS の関数で、入力画像にガウシアンぼかしを適用します。返値は <filter-function>
です。
試してみましょう
filter: blur(0);
filter: blur(4px);
filter: blur(1.5rem);
<section id="default-example">
<img
class="transition-all"
id="example-element"
src="/shared-assets/images/examples/firefox-logo.svg"
width="200" />
</section>
構文
blur()
関数は、適用された要素にガウスぼかしを適用します。
css
blur(radius)
引数
ピクセル数と rem を用いた blur の設定
css
blur(0) /* 効果なし */
blur(8px) /* 半径 8px でぼかす */
blur(1.17rem) /* 半径 1.17rem でぼかす */
SVG フィルター
SVG の <feGaussianBlur>
フィルター要素もコンテンツをぼかすために使用することができます。このフィルターの stdDeviation
属性は最大 2 つの値を受け入れ、より複雑なぼかし値を作成することができます。同等のぼかしを作成するには、 stdDeviation
に 1 つの値を記載します。この SVG 効果は ID で参照することができます。
html
<svg role="none">
<filter id="blur11">
<feGaussianBlur stdDeviation="1.1" edgeMode="duplicate" />
</filter>
</svg>
次の宣言は同じ効果をもたらします。
css
filter: blur(1.1px);
filter: url(#blur11); /* 埋め込み SVG による */
filter: url(folder/fileName.svg#blur11); /* 外部の SVG フィルター定義 */
例
この例では、 3 つの画像を表示させています。 blur()
フィルター関数を適用した画像、同等の SVG blur 関数を適用した画像、そして比較用の元画像です。
css
.filter {
filter: blur(3.5px);
}
html
<svg role="img" aria-label="Flag">
<filter id="blur">
<feGaussianBlur stdDeviation="3.5" edgeMode="duplicate" />
</filter>
<image
href="https://mdn.github.io/shared-assets/images/examples/progress-pride-flag.jpg"
xlink:href="https://mdn.github.io/shared-assets/images/examples/progress-pride-flag.jpg"
filter="url(#blur)" />
</svg>
svg:not([height]) {
display: none;
}
<table cellpadding="5">
<thead>
<tr>
<th>ライブサンプル</th>
<th>同等の SVG</th>
<th>元画像</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<img
class="filter"
src="https://mdn.github.io/shared-assets/images/examples/progress-pride-flag.jpg"
alt="Pride flag" />
</td>
<td>
<svg id="svg" height="220" width="220" style="overflow: visible">
<filter id="svgBlur">
<feGaussianBlur stdDeviation="3.5" />
</filter>
<image
href="https://mdn.github.io/shared-assets/images/examples/progress-pride-flag.jpg"
xlink:href="https://mdn.github.io/shared-assets/images/examples/progress-pride-flag.jpg"
filter="url(#svgBlur)" />
</svg>
</td>
<td>
<img
src="https://mdn.github.io/shared-assets/images/examples/progress-pride-flag.jpg"
alt="Pride flag" />
</td>
</tr>
</tbody>
</table>
仕様書
Specification |
---|
Filter Effects Module Level 1> # funcdef-filter-blur> |
ブラウザーの互換性
Loading…
関連情報
- CSS フィルター効果モジュール
- その他の
filter
およびbackdrop-filter
プロパティの値で使用できる<filter-function>
関数には、次のものがあります。