1/* Answer to "blur behind element css" */
2
3/*
4 This blurs everything behind the element it's applied to
5*/
6
7backdrop-filter: blur(10px);
1.bg-image {
2 /* The image used */
3 background-image: url("photographer.jpg");
4
5 /* Add the blur effect */
6 filter: blur(8px);
7 -webkit-filter: blur(8px);
8
9 height: 100%;
10 background-position: center;
11}
1/* Keyword value */
2backdrop-filter: none;
3
4/* URL to SVG filter */
5backdrop-filter: url(commonfilters.svg#filter);
6
7/* <filter-function> values */
8backdrop-filter: blur(2px);
9backdrop-filter: brightness(60%);
10backdrop-filter: contrast(40%);
11backdrop-filter: drop-shadow(4px 4px 10px blue);
12backdrop-filter: grayscale(30%);
13backdrop-filter: hue-rotate(120deg);
14backdrop-filter: invert(70%);
15backdrop-filter: opacity(20%);
16backdrop-filter: sepia(90%);
17backdrop-filter: saturate(80%);
18
19/* Multiple filters */
20backdrop-filter: url(filters.svg#filter) blur(4px) saturate(150%);
21
22/* Global values */
23backdrop-filter: inherit;
24backdrop-filter: initial;
25backdrop-filter: unset;
1.mydiv { filter: grayscale(50%) }
2
3/* Graut alle Bilder um 50% aus und macht sie um 10px unscharf */
4img {
5 filter: grayscale(0.5) blur(10px);
6}