-
Notifications
You must be signed in to change notification settings - Fork 0
/
pract7a.html
52 lines (46 loc) · 1.38 KB
/
pract7a.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Background Repeat Example</title>
<style>
.repeat {
background-image: url('codechef.png');
background-repeat: repeat;
height: 200px;
width: 400px;
border: 2px solid #000;
}
.repeat-x {
background-image: url('codechef.png');
background-repeat: repeat-x;
height: 200px;
width: 400px;
border: 2px solid #000;
}
.repeat-y {
background-image: url('codechef.png');
background-repeat: repeat-y;
height: 200px;
width: 400px;
border: 2px solid #000;
}
.no-repeat {
background-image: url('codechef.png');
background-repeat: no-repeat;
background-position: center;
background-size: cover; /* Adjust to fit container */
height: 200px;
width: 400px;
border: 2px solid #000;
}
</style>
</head>
<body>
<h2 align="center">CSS Background Repeat Examples</h2>
<h2>repeat</h2><div class="repeat"></div>
<h2>repeat-x</h2><div class="repeat-x"></div>
<h2>repeat-y</h2><div class="repeat-y"></div>
<h2>no-repeat</h2><div class="no-repeat"></div>
</body>
</html>