-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcss-transition.html
58 lines (46 loc) · 936 Bytes
/
css-transition.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
53
54
55
56
57
58
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>CSS transition</title>
<style>
.container {
transition-property: width, height;
transition-duration: 3s;
transition-delay: 1s;
}
.div1 {
padding: 40px 40px;
background: dodgerblue;
width: 400px;
border-radius: 25px;
margin-left: auto;
margin-right: auto;
margin-top: 100px;
}
.div1:hover {
width: 600px;
}
.div2 {
padding: 40px 40px;
background: dodgerblue;
width: 400px;
border-top-left-radius: 20px;
border-top-right-radius: 10px;
margin-left: auto;
margin-right: auto;
margin-top: 100px;
}
.div2:hover {
width: 200px;
}
</style>
</head>
<body>
<p>This example is based on code from the Microsoft presentations related to 98-375. This example shows how <em>transition</em> works in CSS3. Tested with Safari Browser. </p>
<div id="container">
<div class="div1"> first </div>
<div class="div2"> second </div>
</div>
</body>
</html>