-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcricket.html
46 lines (43 loc) · 1.05 KB
/
cricket.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
<!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>Document</title>
<style>
.cricket{
}
.bat{
margin-top: 200px;
transition: transform 0.2s ease-out;
}
.bat:hover {
transform: rotate(-60deg);
transform-origin: 10% 0%;
}
.ball{
width: 50px;
height: 50px;
background-color: brown;
border-radius: 50%;
position: relative;
top: -280px;
left: 420px;
transition: transform 0.3s ease-out 0.15s;
}
.cricket:hover .ball{
transform: translate(1000px, -300px);
}
</style>
</head>
<body>
<div class="cricket">
<div class="bat">
<img src="img/bat.jpg" alt="">
</div>
<div class="ball">
</div>
</div>
</body>
</html>