forked from Shivam-Samant/Animation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSlider.html
47 lines (47 loc) · 1.33 KB
/
Slider.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS slider animation</title>
<style>
body{margin:0;padding: 0%;box-sizing: border-box;background-color: rgba(27,31,34,0.85);}
h1{
color:white;
text-align: center;
text-transform: uppercase;
margin-top: 30px;
font-size: 2.1rem;
letter-spacing: 0.5rem;
}
.slider{
width:70%;
height:400px;
box-shadow: 1px 2px 10px 5px white;
position: absolute;
top:50%;
left:50%;
transform: translate(-50%,-50%);
background-image: url(../image/logo1.png);
background-size: 100% 100%;
animation:slider 10s infinite linear;
}
@keyframes slider{
0%{
background-image: url(../image/logo1.png);
}
35%{
background-image: url(../image/user.jpg);
}
75%{
background-image: url(../image/bg.jpg);
}
}
</style>
</head>
<body>
<h1>CSS slider animation</h1>
<div class="slider"></div>
</body>
</html>