Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web/CSS/backdrop-filter を更新 #23867

Merged
merged 1 commit into from
Oct 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 29 additions & 23 deletions files/ja/web/css/backdrop-filter/index.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
---
title: backdrop-filter
slug: Web/CSS/backdrop-filter
l10n:
sourceCommit: 1c4eb0bfb5f72a26fcc21a83fac91aa3e66c2fb8
---

{{CSSRef}}

**`backdrop-filter`** は [CSS](/ja/docs/Web/CSS) のプロパティで、要素の背後の領域に、ぼかしや色変化のようなグラフィック効果を適用することができます。要素の*背後*のすべてに適用されるため、効果を見るためには少なくとも一部が透明な要素またはその背景を作成する必要があります。
**`backdrop-filter`** は [CSS](/ja/docs/Web/CSS) のプロパティで、要素の背後の領域に、ぼかしや色変化のようなグラフィック効果を適用することができます。要素の背後にあるすべてに適用されるため、要素またはその背景が透明または部分的に透明である必要があります。

{{EmbedInteractiveExample("pages/css/backdrop-filter.html")}}

## 構文

```css
/* キーワード値 */
Expand Down Expand Up @@ -33,19 +39,16 @@ backdrop-filter: url(filters.svg#filter) blur(4px) saturate(150%);
backdrop-filter: inherit;
backdrop-filter: initial;
backdrop-filter: revert;
backdrop-filter: revert-layer;
backdrop-filter: unset;
```

{{EmbedInteractiveExample("pages/css/backdrop-filter.html")}}

## 構文

### 値

- `none`
- : 背後にフィルターを適用しません。
- `<filter-function-list>`
- : 背景に適用する {{cssxref("&lt;filter-function&gt;")}} または [SVG フィルター](/ja/docs/Web/SVG/Element/filter)の空白区切りのリストです。
- : 背景に適用する {{cssxref("&lt;filter-function&gt;")}} または [SVG フィルター](/ja/docs/Web/SVG/Element/filter)の空白区切りのリストです。CSS の `<filter-function>` には {{CSSxRef("filter-function/blur", "blur()")}}, {{CSSxRef("filter-function/brightness", "brightness()")}}, {{CSSxRef("filter-function/contrast", "contrast()")}}, {{CSSxRef("filter-function/drop-shadow", "drop-shadow()")}}, {{CSSxRef("filter-function/grayscale", "grayscale()")}}, {{CSSxRef("filter-function/hue-rotate", "hue-rotate()")}}, {{CSSxRef("filter-function/invert", "invert()")}}, {{CSSxRef("filter-function/opacity", "opacity()")}}, {{CSSxRef("filter-function/saturate", "saturate()")}}, {{CSSxRef("filter-function/sepia", "sepia()")}} があります。

## 公式定義

Expand All @@ -61,39 +64,38 @@ backdrop-filter: unset;

```css
.box {
background-color: rgba(255, 255, 255, 0.3);
border-radius: 5px;
font-family: sans-serif;
text-align: center;
line-height: 1;
-webkit-backdrop-filter: blur(10px);
background-color: rgb(255 255 255 / 30%);
backdrop-filter: blur(10px);
max-width: 50%;
max-height: 50%;
padding: 20px 40px;
}

html,
body {
height: 100%;
width: 100%;
background-image: url("anemones.jpg");
}
```

```css hidden
html,
body {
background-image: url(https://picsum.photos/id/1080/6858/4574),
linear-gradient(rgb(219, 166, 166), rgb(0, 0, 172));
background-position: center center;
background-repeat: no-repeat;
background-size: cover;
height: 100%;
width: 100%;
}

.container {
background-size: cover;
align-items: center;
display: flex;
justify-content: center;
height: 100%;
width: 100%;
}
.box {
border-radius: 5px;
font-family: sans-serif;
text-align: center;
max-width: 50%;
max-height: 50%;
padding: 20px 40px;
}
```

### HTML
Expand Down Expand Up @@ -121,3 +123,7 @@ body {
## 関連情報

- {{cssxref("filter")}}
- {{cssxref("&lt;filter-function&gt;")}}
- {{cssxref("background-blend-mode")}}, {{cssxref("mix-blend-mode")}}
- [CSS フィルター効果](/ja/docs/Web/CSS/CSS_filter_effects)
- [CSS 合成と混合](/ja/docs/Web/CSS/CSS_compositing_and_blending)