forked from s-yadav/iv-viewer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
imageviewer.css
226 lines (211 loc) · 4.71 KB
/
imageviewer.css
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
/*
ImageViewer v 1.1.0
Author: Sudhanshu Yadav
Copyright (c) 2015 to Sudhanshu Yadav - ignitersworld.com , released under the MIT license.
Demo on: http://ignitersworld.com/lab/imageViewer.html
*/
/***** image viewer css *****/
#iv-container {
position: fixed;
background: #0d0d0d;
width: 100%;
height: 100%;
top: 0;
left: 0;
display: none;
z-index: 1000;
}
.iv-container {
overflow: hidden;
}
.iv-close {
width: 32px;
height: 32px;
position: absolute;
right: 20px;
top: 20px;
cursor: pointer;
text-align: center;
overflow: hidden;
text-shadow: 0px 0px 3px #6d6d6d;
-webkit-transition: all ease 200ms;
-moz-transition: all ease 200ms;
-o-transition: all ease 200ms;
transition: all ease 200ms;
}
.iv-close:after,
.iv-close:before {
content: "";
height: 4px;
width: 32px;
background: #FFF;
position: absolute;
left: 0;
top: 50%;
margin-top: -2px;
}
.iv-close:before {
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg);
}
.iv-close:after {
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
-o-transform: rotate(-45deg);
transform: rotate(-45deg);
}
.iv-close:hover {
-webkit-transform: rotate(90deg);
-moz-transform: rotate(90deg);
-ms-transform: rotate(90deg);
-o-transform: rotate(90deg);
transform: rotate(90deg);
}
/***** snap view css *****/
.iv-snap-view {
width: 150px;
height: 150px;
position: absolute;
top: 20px;
left: 20px;
border: 1px solid #666;
background: black;
z-index: 100;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
-webkit-transition: all ease 400ms;
-moz-transition: all ease 400ms;
-o-transition: all ease 400ms;
transition: all ease 400ms;
opacity: 0;
}
.iv-snap-image-wrap {
display: inline-block;
position: absolute;
max-width: 150px;
max-height: 150px;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
-moz-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
-o-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
overflow: hidden;
}
.iv-snap-image {
position: relative;
}
.iv-snap-handle {
position: absolute;
border: 1px solid #ccc;
-webkit-transform: translate3d(0, 0, 0);
-moz-transform: translate3d(0, 0, 0);
-ms-transform: translate3d(0, 0, 0);
-o-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
-webkit-box-shadow: 0px 0px 0px 200px rgba(0, 0, 0, 0.5);
-moz-box-shadow: 0px 0px 0px 200px rgba(0, 0, 0, 0.5);
box-shadow: 0px 0px 0px 200px rgba(0, 0, 0, 0.5);
}
/*** zoom slider ***/
.iv-zoom-slider {
width: 100%;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
border: 1px solid #666;
border-top: 0;
background: rgba(204, 204, 204, 0.1);
height: 15px;
position: absolute;
top: 150px;
left: -1px;
}
.iv-zoom-handle {
width: 20px;
height: 15px;
background: #ccc;
position: absolute;
}
/**** snap view css end *****/
.iv-image-view {
position: absolute;
height: 100%;
width: 100%;
}
.iv-image-wrap {
display: inline-block;
}
.iv-image-wrap:active {
cursor: move;
}
.iv-large-image {
max-width: 100%;
max-height: 100%;
position: absolute;
-webkit-transform: translate3d(0, 0, 0);
-moz-transform: translate3d(0, 0, 0);
-ms-transform: translate3d(0, 0, 0);
-o-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
/****** CSS loader by http://projects.lukehaas.me/css-loaders/ *****/
.iv-loader {
top: 50%;
left: 50%;
border-radius: 50%;
width: 32px;
height: 32px;
z-index: 100;
margin-top: -16px;
margin-left: -16px;
font-size: 5px;
position: absolute;
text-indent: -9999em;
border-top: 1.1em solid rgba(255, 255, 255, 0.2);
border-right: 1.1em solid rgba(255, 255, 255, 0.2);
border-bottom: 1.1em solid rgba(255, 255, 255, 0.2);
border-left: 1.1em solid #ffffff;
-webkit-transform: translateZ(0);
-ms-transform: translateZ(0);
transform: translateZ(0);
-webkit-animation: load8 1.1s infinite linear;
animation: load8 1.1s infinite linear;
}
.iv-loader:after {
width: 10em;
height: 10em;
border-radius: 50%;
}
@-webkit-keyframes load8 {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes load8 {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@media screen and (max-width: 767px) {
.iv-snap-view {
z-index: -1;
visibility: hidden;
}
}