-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Expand file tree
/
Copy pathbackground-color-animation-with-images.html
More file actions
51 lines (51 loc) · 1.58 KB
/
background-color-animation-with-images.html
File metadata and controls
51 lines (51 loc) · 1.58 KB
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
<!DOCTYPE html>
<link rel="help" href="https://un5n798jx6qx6j0rmf2verhh.julianrbryant.com/css-backgrounds-3/#background-color">
<link rel="match" href="background-color-animation-with-images-ref.html">
<style>
.container1 {
width: 200px;
height: 200px;
/* Test the case where images partially occludes the background color */
background-image: url("../support/green.png"), url("../support/red.png");
background-size: 100px 100px;
background-repeat: no-repeat;
animation: blue-anim 100s;
}
.container2 {
width: 200px;
height: 200px;
/* Test the case where images partially occludes the background color */
background-image: url("../support/green.png"), url("../support/red.png");
background-size: 100px 100px;
background-repeat: no-repeat;
animation: transparent-anim 100s;
}
.container3 {
width: 100px;
height: 100px;
/* Test the case where images occludes the background color */
background-image: url("../support/green.png"), url("../support/red.png");
animation: transparent-anim 100s;
}
.container4 {
width: 100px;
height: 100px;
/* Test the case where images occludes the background color */
background-image: url("../support/green.png"), url("../support/red.png");
animation: blue-anim 100s;
}
@keyframes blue-anim {
0% { background-color: rgb(0, 0, 199); }
100% { background-color: rgb(0, 0, 200); }
}
@keyframes transparent-anim {
0% { background-color: rgba(0, 200, 0, 0); }
100% { background-color: rgba(200, 0, 0, 0); }
}
</style>
<body>
<div class="container1"></div>
<div class="container2"></div>
<div class="container3"></div>
<div class="container4"></div>
</body>