Skip to content

Instantly share code, notes, and snippets.

@fentas
Created July 9, 2015 21:44
Show Gist options
  • Save fentas/e2a7c4e2dade896b79e4 to your computer and use it in GitHub Desktop.
Save fentas/e2a7c4e2dade896b79e4 to your computer and use it in GitHub Desktop.
.my-container { position: relative; background: #5C97FF; overflow: hidden; } /* You could use :after - it doesn't really matter */ .my-container:before { content: ' '; display: block; position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 1; opacity: 0.6; background-image: url('http://placekitten.com/1500/1000'); background-repeat: no-repeat; background-position: 50% 0; -ms-background-size: cover; -o-background-size: cover; -moz-background-size: cover; -webkit-background-size: cover; background-size: cover; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment