-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.scss
More file actions
120 lines (119 loc) · 3.18 KB
/
style.scss
File metadata and controls
120 lines (119 loc) · 3.18 KB
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
.no-transition {
transition: none !important;
}
.for-box{
margin: 0 auto;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: black;
max-width: 1200px;
perspective: 500px;
.box{
width: 400px;
height: 400px;
position: relative;
transform-style: preserve-3d;
transform-origin: center center -175px;
transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg) ;
transition: 600ms;
.ground{
user-select: none;
color: white;
display: flex;
justify-content: center;
align-items: center;
font-size: 30px;
position: absolute;
width: 350px;
height: 350px;
transition: 1000ms;
}
.ground1{
top: 50%;
left: 50%;
transform: translate3d(-50%,-50%,0);
}
.ground2{
top: 50%;
left: 50%;
transform-origin: left;
transform: translate3d(50%,-50%,0) rotateY(90deg);
}
.ground3{
top: 50%;
left: 50%;
transform-origin: right;
transform: translate3d(-150%,-50%,0) rotateY(-90deg);
}
.ground4{
top: 50%;
left: 50%;
transform-origin: bottom;
transform: translate3d(-50%,-150%,0) rotateX(90deg);
}
.ground5{
top: 50%;
left: 50%;
transform-origin: top;
transform: translate3d(-50%,50%,0) rotateX(-90deg);
}
.ground6{
top: 50%;
left: 50%;
transform: translate3d(-50%,-50%,-350px) rotateY(180deg);
}
.ibg{
background-position: bottom center;
}
}
.anim_active{
animation: RotateBox 5s infinite;
animation-direction: normal;
}
.hovered{
.ground2{
transform: translate3d(50%,-50%,0) rotateY(0deg);
}
.ground3{
transform: translate3d(-150%,-50%,0) rotateY(0deg);
}
.ground4{
transform: translate3d(-50%,-150%,0) rotateX(0deg);
}
.ground5{
transform: translate3d(-50%,50%,0) rotateX(0deg);
}
.ground6{
transform: translate3d(-50%,-50%,-100px) rotateY(0deg);
}
}
}
@media screen and (max-width:600px){
.for-box{
.box{
width: 250px;
height: 250px;
transform-origin: center center -100px;
.ground{
width: 200px;
height: 200px;
}
.ground6{
transform: translate3d(-50%,-50%,-200px) rotateY(180deg);
}
}
}
}
@keyframes RotateBox{
0%{
transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
}
50%{
transform: rotateX(-280deg) rotateY(276deg) rotateZ(250deg);
}
100%{
transform: rotateX(0deg) rotateY(-360deg) rotateZ(360deg);
}
}