Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Blurry background with no transparency but that takes into account the color behind

I am new to CSS and was wondering how I could achieve the following behavior: somewhat blurry, but with no transparency.
enter image description here https://rarible.com/mitama-mint/items

I could not deduce anything from the chrome inspector. I tried to add some transparency but it is not that.

do you have an idea?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

thanks

I added some transparency with a white background. but it was not the right behavior.

>Solution :

You could apply a blur backdrop-filter, to get the desired effect. As you provided no code, I’ll show you a example and please have a look on the MDN Web Docs.

Example:

.example-container {
  background-image: url("https://interactive-examples.mdn.mozilla.net/media/examples/balloon.jpg");
  background-size: cover;
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}
#example-element {
  font-weight: 700;
  flex: 1;
  text-align: center;
  padding: 20px 10px;
  background-color: rgba(255, 255, 255, 0.2);
}
<div class="example-container">
    <div id="example-element" style="backdrop-filter: blur(10px);">Example</div>
</div>

From the MDN page, this is a "property that lets you apply graphical effects such as blurring or color shifting to the area behind an element. Because it applies to everything behind the element, to see the effect you must make the element or its background at least partially transparent."

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading