This repository has been archived by the owner on May 1, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
style.css
94 lines (91 loc) · 1.79 KB
/
style.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
.overlay::selection {
background: transparent;
}
.crop-component::selection {
background: transparent;
}
.crop-blur {
-webkit-filter: blur(10px) sepia(0.2);
filter: blur(10px) sepia(0.2);
}
.crop-image,
.overlay > img {
width: auto;
height: auto;
/* можно явно указать либо ширину, либо высоту */
width: 500px;
/*либо height: 300px;*/
display: block;
object-fit: contain;
object-position: center;
}
/*add stretch*/
.crop-image {
display: block;
position: relative;
pointer-events: none;
}
/*add stretch*/
.overlay > img {
position: absolute;
display: block;
}
.crop-component {
position: relative;
display: table;
z-index: 999;
background-color: white;
margin: 0 auto;
overflow: hidden;
border: white 3px solid;
}
.overlay {
position: absolute;
z-index: 999;
left: 50%;
top: 50%;
margin-left: -100px;
margin-top: -100px;
width: 200px;
height: 200px;
box-shadow: 0 0 0 3px white;
overflow: hidden;
box-sizing: content-box;
}
.overlay:hover,
.overlay:active {
cursor: move;
}
.btn-crop {
position: absolute;
vertical-align: bottom;
right: 5px;
bottom: 5px;
padding: 6px 10px;
z-index: 999;
background-color: #DE3C50;
border: none;
border-radius: 5px;
color: #FFF;
}
.btn-crop img {
vertical-align: middle;
margin-left: 8px;
}
main.center {
/* Firefox */
display: -moz-box;
-moz-box-pack: center;
-moz-box-align: center;
/* Safari, Opera, and Chrome */
display: -webkit-box;
-webkit-box-pack: center;
-webkit-box-align: center;
/* W3C */
display: box;
box-pack: center;
box-align: center;
width: 100%;
height: 100%;
background: #EAEAEA;
}