How can I apply a gradual blur to a background image (so that a text overlay is easily readable)?

Ryan

I have a large photo, such as http://www.bestwallpapersfan.com/wp-content/uploads/2014/05/1755137.jpg. I want to overlay text near its bottom.

To ensure that the text is readable, I want to use the Floor Blur approach described here: https://medium.com/@erikdkennedy/7-rules-for-creating-gorgeous-ui-part-2-430de537ba96#dc39-765a9789c924

I've learned how to do a simple Floor Fade to Black or a simple blur (both described here: https://css-tricks.com/design-considerations-text-images/).

But how do I combine the effects such that it's a gradual / gradient / progressive blur?

Thanks!

Ryan

This is pretty close to what I was looking for and now just needs to be cleaned up to fix the funkiness with the h1, etc.

.container {
  width: 400px;
  height: 300px;
  position: relative;
}

.gradient {
  position: absolute;
  width: 400px;
  height: 300px;
  margin: 20px;
  background: linear-gradient( to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.9));
  opacity: 0.99;
  z-index: 2;
}

.module {
  background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/3/skyscrapers.jpg);
  background-attachment: fixed;
  width: 400px;
  height: 300px;
  position: absolute;
  overflow: hidden;
  margin: 20px;
  z-index: 1;
}

.module>header {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px 10px;
  background: inherit;
  background-attachment: fixed;
  z-index: 3;
}

.module>header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 30px;
  width: 100%;
  height: 100%;
  background: inherit;
  background-attachment: fixed;
  -webkit-filter: blur(12px);
  filter: blur(12px);
  transform: scale(2) translateY(20px);
}

.module>header>h1 {
  margin: 0;
  color: white;
  position: relative;
  z-index: 4;
}

.title {
  margin: 0;
  color: white;
  position: absolute;
  z-index: 4;
}

* {
  box-sizing: border-box;
}
<div class="container">
  <div class="gradient">
  </div>
  <div class="module">
    <header>
      <h1>
        Skyscraper
      </h1>
    </header>
  </div>
  <div class="title">
    Skyscraper
  </div>
</div>

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How can I blur text in an image?

From Dev

How can I blur the "repeated" part of background image?

From Dev

How can I blur the "repeated" part of background image?

From Dev

How can I overlay a background pattern on PNG image visible part?

From Dev

How can I overlay a background pattern on PNG image visible part?

From Dev

How to blur background image on hover but not the text

From Dev

I want a blurred background image with overlay text

From Dev

how do i blur background behind the text

From Dev

How can I overlay text onto an image in this example?

From Dev

How can I blur the background and still be able to clip the unblurred background to the text?

From Dev

How can I blur the background in Skype?

From Java

How can I make a CSS glass/blur effect work for an overlay?

From Dev

How can I make text in meld readable?

From Dev

How can I make text in meld readable?

From Dev

How to apply effect just to background image and not text

From Dev

How to apply effect just to background image and not text

From Dev

How Can I Place A Label Onto An Image And Ensure That The Text Is Always Readable?

From Dev

How can I bring my text to the front and leave the image on the background?

From Dev

How can i apply this blur effect on my website

From Dev

Css blur on background image :hover but not on text

From Dev

How do I overlay a div on an empty div containing a background image?

From Dev

How can I wrap my bootstrap containers so I can have a scaling image background?

From Dev

Content becomes disabled when I apply an overlay color on the background image div

From Dev

Apply opacity to background image but not text

From Dev

How can I apply page specific Full screen background image using React?

From Dev

How can I apply percentage-based positioning to background-image sprites with pure CSS?

From Dev

How can I create both image captions and a image overlay with CSS?

From Dev

How can I avoid a black background when fading in an overlay with ffmpeg?

From Dev

How to apply SVG so that it works in IE background image

Related Related

  1. 1

    How can I blur text in an image?

  2. 2

    How can I blur the "repeated" part of background image?

  3. 3

    How can I blur the "repeated" part of background image?

  4. 4

    How can I overlay a background pattern on PNG image visible part?

  5. 5

    How can I overlay a background pattern on PNG image visible part?

  6. 6

    How to blur background image on hover but not the text

  7. 7

    I want a blurred background image with overlay text

  8. 8

    how do i blur background behind the text

  9. 9

    How can I overlay text onto an image in this example?

  10. 10

    How can I blur the background and still be able to clip the unblurred background to the text?

  11. 11

    How can I blur the background in Skype?

  12. 12

    How can I make a CSS glass/blur effect work for an overlay?

  13. 13

    How can I make text in meld readable?

  14. 14

    How can I make text in meld readable?

  15. 15

    How to apply effect just to background image and not text

  16. 16

    How to apply effect just to background image and not text

  17. 17

    How Can I Place A Label Onto An Image And Ensure That The Text Is Always Readable?

  18. 18

    How can I bring my text to the front and leave the image on the background?

  19. 19

    How can i apply this blur effect on my website

  20. 20

    Css blur on background image :hover but not on text

  21. 21

    How do I overlay a div on an empty div containing a background image?

  22. 22

    How can I wrap my bootstrap containers so I can have a scaling image background?

  23. 23

    Content becomes disabled when I apply an overlay color on the background image div

  24. 24

    Apply opacity to background image but not text

  25. 25

    How can I apply page specific Full screen background image using React?

  26. 26

    How can I apply percentage-based positioning to background-image sprites with pure CSS?

  27. 27

    How can I create both image captions and a image overlay with CSS?

  28. 28

    How can I avoid a black background when fading in an overlay with ffmpeg?

  29. 29

    How to apply SVG so that it works in IE background image

HotTag

Archive