Click here to Skip to main content
15,506,385 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I follow some of the answer of this, But I still didn't get it.
It display blank on my page.

What I have tried:

.container{
	width: 100%;
	height: 100vh;
	background-image: linear-gradient (to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 100%),url('images/background.jpg');
	background-position: center;
	background size: cover;
}


or

.container{
	width: 100%;
	height: 100vh;
	background-image: linear-gradient (rgba(0, 0, 0, 0.7)  rgba(0, 0, 0, 0.7) ),url('images/background.jpg');
	background-position: center;
	background size: cover;
}
Posted
Updated 5-Sep-22 7:44am
Comments
Member 15627495 6-Sep-22 1:35am    
if you want a transparent background, you need to use PNG, because of the alpha canal.
this type of file handle 'transparency'.

jpg are more simple, so the alpha canal is not in.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900