-
Notifications
You must be signed in to change notification settings - Fork 1
/
perspective.html
95 lines (83 loc) · 1.89 KB
/
perspective.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<!DOCTYPE html>
<html>
<head>
<title></title>
<style>
*{
padding: 0;
margin: 0;
font-family: verdana;
color:white;
text-align: center;
}
body{
background:black;
}
#blue{
height: 250px;
width: 100%;
}
#blue div{
height: 250px;
width: 100%;
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#00b7ea), color-stop(100%,#009ec3));
-webkit-transform: perspective(800px);
-webkit-transition: all 1.5s;
}
#blue:hover div{
-webkit-transform: perspective(800px) rotateX(-15deg) scale(0.96) translateY(-5px);
}
#red{
width: 100%;
height: 150px;
}
#red div{
width: 100%;
height: 150px;
background: -webkit-linear-gradient(top, #a90329 0%,#8f0222 44%,#6d0019 100%);
-webkit-transform: perspective(800px);
-webkit-transition: all 0.5s;
}
#red:hover div{
-webkit-transform: perspective(800px) rotatey(-180deg);
background: white;
}
.green{
width: 100px;
height: 100px;
float:left;
margin: 10px;
}
.green div{
width: 100px;
height: 100px;
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#cdeb8e), color-stop(100%,#a5c956));
-webkit-transform: perspective(800px);
-webkit-transition: all 0.5s;
-webkit-border-radius:5px;
}
.green:hover div{
-webkit-transform: perspective(800px) rotatey(-180deg);
background: white;
}
</style>
</head>
<body>
<div id="blue">
<div><h1>Hej alle</h1></div>
</div>
<div id="red">
<div><h2>CSS3 3D-Perspektivering</h2></div>
</div>
<div class="green"><div>1</div></div>
<div class="green"><div>2</div></div>
<div class="green"><div>3</div></div>
<div class="green"><div>4</div></div>
<div class="green"><div>5</div></div>
<div class="green"><div>6</div></div>
<div class="green"><div>7</div></div>
<div class="green"><div>8</div></div>
<div class="green"><div>9</div></div>
<div class="green"><div>0</div></div>
</body>
</html>