Skip to content

Commit 16c0e66

Browse files
💡 Master CSS Background!
I have used multiple Bg in the same div with CSS background properties
1 parent 4fc02ee commit 16c0e66

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

‎CSS_Background.html

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8">
6+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
7+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
8+
<title>Background</title>
9+
<!--Style Tag-->
10+
<style>
11+
body {
12+
padding: 0%;
13+
margin: 0%;
14+
}
15+
16+
h1 {
17+
text-align: center;
18+
}
19+
20+
section {
21+
width: 80%;
22+
height: 800px;
23+
background-image: url("https://images.unsplash.com/photo-1677922069662-bd3a0489f8be?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1yZWxhdGVkfDR8fHxlbnwwfHx8fHw%3D&auto=format&fit=crop&w=500&q=60"),
24+
url("https://images.unsplash.com/photo-1677922069603-c1eaa49f2a8b?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1yZWxhdGVkfDV8fHxlbnwwfHx8fHw%3D&auto=format&fit=crop&w=500&q=60"),
25+
url("https://images.unsplash.com/photo-1598591112468-810523ba7d1c?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1yZWxhdGVkfDExfHx8ZW58MHx8fHx8&auto=format&fit=crop&w=500&q=60");
26+
background-size: contain, contain, contain;
27+
background-repeat: no-repeat, no-repeat, no-repeat;
28+
border-radius: 10px;
29+
background-position: left, center, right;
30+
box-shadow: rgb(38, 57, 77) 0px 20px 30px -10px;
31+
margin: auto;
32+
33+
}
34+
</style>
35+
36+
</head>
37+
38+
<body>
39+
<h1>Look at the Image👇</h1>
40+
<section>
41+
</section>
42+
</body>
43+
44+
</html>

0 commit comments

Comments
 (0)