Skip to content

Instantly share code, notes, and snippets.

@amitkeret
Created March 25, 2019 10:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amitkeret/57907999d0262029f79212f3d0223254 to your computer and use it in GitHub Desktop.
Save amitkeret/57907999d0262029f79212f3d0223254 to your computer and use it in GitHub Desktop.
responsive blurred image background
body
display flex
.image
width 30vw
height 80vh
margin auto
position relative
overflow hidden
&::before
&::after
content ''
position absolute
top 0
left 0
width 100%
height 100%
background-image url(https://images.unsplash.com/photo-1449426468159-d96dbf08f19f?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1500&q=80)
background-position center center
background-repeat no-repeat
&::before
background-size cover
filter blur(15px)
&::after
background-size contain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment