Answer the question
In order to leave comments, you need to log in
:after Not displayed, why?
#blcus {
background-attachment: fixed;
background-image: url(../images/b-h.jpg);
background-size: cover;
margin: 10px 30px 0px 30px;
padding-bottom: 20px;
position: relative;
z-index: 1;
}
#blcus:after {
background-color: #272a33f2;
content: '';
height: 100%;
left: 0;
position: absolute;
top: 0;
width: 100%;
z-index: 2;
}
Answer the question
In order to leave comments, you need to log in
In the 'background-color' property, shorten the value to 6 characters after '#', and at the same time add a second colon before 'after'
:after literally means after content
if there is no content in the block (empty) then after will not work
, so it does not work for images, inputs, etc.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question