88
loading...
This website collects cookies to deliver better user experience
backdrop-filter:
, specifically using the function blur()
.backdrop-filter:
property in any context (unless you're willing to turn on some features in about:config
).backdrop-filter:
property, is done by filters, which are CSS functions that affect images of any kind, whether they are image elements, or backgrounds. backdrop-filter:
simplifies our workflow by allowing us to directly apply these filters to the background of any element, which is something we couldn't do in the past. We can achieve the same level of versatility with the method mentioned here.property: value;
pair of z-index: -1;
.backdrop-filter: blur(8px);
from the parent div, added position: relative;
and a ::before
pseudo-element with the following properties:div::before {
background-color: rgb(235, 235, 235);
content: '';
position: absolute;
inset: 3%;
z-index: -1;
}
filter: blur();
and change rgb()
to rgba()
, as follows:div::before {
div::before {
background-color: rgba(235, 235, 235, .3);
content: '';
filter: blur(18px);
position: absolute;
inset: 3%;
z-index: -1;
}
div::before {
background-color: rgba(35, 35, 35, 1);
content: '';
filter: blur(18px);
position: absolute;
inset: 10%;
z-index: -1;
}
property: value;
pair, it's FAR more versatile, apart from being better supported across different browsers. Both solutions can be animated, but this method gives you more options, and can be pretty smooth if done correctly (see my portfolio for instance).