Darken the image with a transparent background?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
9 views
Link to code
As the image with a transparent background to make it black?
It is possible in photoshop to invert the colors, but I want using CSS
by | 9 views

3 Answers

0 like 0 dislike
filter: brightness(0);
\rhttps://codepen.io/anon/pen/pVWPBX
by
0 like 0 dislike
background: linear-gradient(rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.25)), url('example.jpg') no-repeat fixed center;


rgba adjust under itself
by
0 like 0 dislike
through the pseudo-element. To set the image as background-imag ,for example,
.block {
position: relative;
background-imag:url('.....');}

then the pseudo-element
.block::before {
position: absolute;
top:0;
left: 0;
bottom: 0;
right: 0;
bacground-color: rgba(0,0,0, 0.6);
z-index: 2;
}
by

Related questions

0 like 0 dislike
2 answers
0 like 0 dislike
3 answers
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
0 like 0 dislike
2 answers
asked Jun 8, 2019 by WarriorKodeK
110,608 questions
257,186 answers
0 comments
35,390 users