-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path18-hover.html
52 lines (52 loc) · 1.01 KB
/
18-hover.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Effects and Transitions</title>
<style>
html {
background: #ccc;
margin: 0;
padding: 0;
}
body {
background: white;
width: 800px;
margin: 0 auto;
padding: 1em;
}
h1 {
margin: 0;
padding: 1em 0;
}
.outer {
height: 500px;
width: 500px;
background: blue;
}
.outer p {
color: white;
}
.inner {
height: 100px;
width: 100px;
background: red;
transition: opacity 3s, height 2s, width 2s, transform 1s;
}
.inner:hover {
background: green;
height: 150px;
width: 150px;
opacity: 0.75;
transform: rotate(45deg);
}
</style>
</head>
<body>
<h1>Effects</h1>
<div class="outer">
<div class="inner"></div>
<p>Here is some text inside a blue box.</p>
</div>
</body>
</html>