-
Notifications
You must be signed in to change notification settings - Fork 0
/
squareRound.html
139 lines (131 loc) · 3.03 KB
/
squareRound.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Scripted Pixels' Square to Round</title>
<link rel="stylesheet" href="css/reset.css">
<style type="text/css">
/* setup the very basis for the document */
body {
text-align:center;
font-family:helvetica;
font-size: 16px;
background: #FA4E06;
padding-top: 200px;
}
a {
color: #f0f0f0;
text-decoration: none;
}
.container {
clear: both;
display: block;
margin: 0 auto;
width: 200px;
}
/* ANIMATIONS */
.object, .objectContainer a {
-webkit-transition: all 0.35s ease-in-out;
-moz-transition: all 0.35s ease-in-out;
-ms-transition: all 0.35s ease-in-out;
-o-transition: all 0.35s ease-in-out;
transition: all 0.35s ease-in-out;
}
.objectContainer {
width: 200px;
height: 200px;
float: left;
display: block;
position: relative;
}
.objectContainer .object {
display: block;
width: 100%;
height: 100%;
}
.objectContainer a {
position: absolute;
bottom: -200px;
left: 0;
opacity: 0;
width: 100%;
line-height: 200px;
text-align: center;
vertical-align: middle;
}
.objectContainer:hover .object {
margin: 2.5%;
height: 95%;
width: 95%;
border-radius: 100px;
-webkit-transform: rotate(100deg);
-moz-transform: rotate(100deg);
-ms-transform: rotate(100deg);
-o-transform: rotate(100deg);
transform: rotate(100deg);
}
.objectContainer:hover a {
opacity: 1;
bottom: 0;
}
/* NO ROTATE */
#noRotate {
overflow: hidden;
}
#noRotate .objectContainer:hover .object {
-webkit-transform: rotate(0deg);
-moz-transform: rotate(0deg);
-ms-transform: rotate(0deg);
-o-transform: rotate(0deg);
transform: rotate(0deg);
}
#smallRotate .objectContainer:hover .object.lessRadi {
-webkit-transform: rotate(90deg);
-moz-transform: rotate(90deg);
-ms-transform: rotate(90deg);
-o-transform: rotate(90deg);
transform: rotate(90deg);
border-radius: 70px 0;
}
#red.object {
background: #e7222f;
}
#brown.object {
background: #796959;
}
#dGrey.object {
background: #363635;
}
#Grey.object {
background: #6f6f6e;
}
</style>
</head>
<body>
<div class="container">
<div class="objectContainer">
<div id="red" class="object"></div>
<a href="#" >A link </a>
</div>
</div>
<div id="noRotate" class="container">
<div class="objectContainer">
<div id="dGrey" class="object"></div>
<a href="#" >A link </a>
</div>
</div>
<div id="smallRotate" class="container">
<div class="objectContainer">
<div id="red" class="object lessRadi"></div>
<a href="#" >A link </a>
</div>
</div>
<!-- jQuery library (served from Google) -->
<script src="js/jquery-1.10.2.min.js"></script>
<script src="js/jquery.easing.1.3.js"></script>
<!-- TOUCH EVENTS -->
<script src="js/jquery.tappable.js"></script>
</body>
</html>