Created
December 12, 2017 07:32
-
-
Save alexsoin/68fe241c30c65024e08282ca058b844b to your computer and use it in GitHub Desktop.
Добавление затемнения на background
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.bg { | |
background-image: url('img/img.jpg'); | |
background-repeat: no-repeat; | |
background-position: top center; | |
background-size: cover; | |
height: 100vh; | |
width: 100%; | |
position: relative; | |
-webkit-transition: all 0.4s; | |
-moz-transition: all 0.4s; | |
transition: all 0.4s; | |
} | |
.bg:before { | |
content: ""; | |
position:absolute; | |
width: 100%; | |
height: 100%; | |
background: rgba(0,0,0,0.5); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment