Skip to content

Commit f84ba60

Browse files
Merge pull request #3 from MuhammadShakir-dev/MuhammadShakir-dev-patch-3
💡Get Familiar with CSS Transition
2 parents 2356535 + 73c226d commit f84ba60

File tree

1 file changed

+79
-0
lines changed

1 file changed

+79
-0
lines changed

CSS_Transition.html

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
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>CSS Trnasition</title>
9+
10+
<!--Style Tag-->
11+
<style>
12+
body {
13+
padding: 0px;
14+
margin: 0px;
15+
}
16+
17+
h1 {
18+
text-align: center;
19+
}
20+
21+
section {
22+
width: 90%;
23+
height: 500px;
24+
box-shadow: rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;
25+
border-radius: 10px;
26+
position: absolute;
27+
top: 50%;
28+
left: 50%;
29+
transform: translate(-50%, -50%);
30+
}
31+
32+
section div {
33+
width: 100px;
34+
height: 100px;
35+
border: none;
36+
background-color: blue;
37+
margin: 10px 0px;
38+
border-radius: 5px;
39+
transition: margin-left 2s;
40+
}
41+
42+
section:hover div {
43+
margin-left: 800 px;
44+
}
45+
46+
div:nth-of-type(1) {
47+
transition-timing-function: ease-in;
48+
49+
}
50+
51+
div:nth-of-type(2) {
52+
transition-timing-function: ease-out;
53+
54+
}
55+
56+
div:nth-of-type(3) {
57+
transition-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
58+
59+
}
60+
61+
div:nth-of-type(4) {
62+
transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1);
63+
64+
}
65+
</style>
66+
67+
</head>
68+
69+
<body>
70+
<h1>CSS Transition</h1>
71+
<section>
72+
<div></div>
73+
<div></div>
74+
<div></div>
75+
<div></div>
76+
</section>
77+
</body>
78+
79+
</html>

0 commit comments

Comments
 (0)