forked from shikkandar/buildersEnginerringCollege
-
Notifications
You must be signed in to change notification settings - Fork 0
/
scroll.html
116 lines (102 loc) · 4.19 KB
/
scroll.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
<!DOCTYPE html>
<html>
<head>
<style>
.rubiks-cube {
width: 300px;
height: 300px;
perspective: 800px;
margin: 100px auto;
}
.cube {
width: 100%;
height: 100%;
transform-style: preserve-3d;
transform: rotateX(20deg) rotateY(40deg);
animation: spin 10s infinite linear;
}
.face {
position: absolute;
width: 100%;
height: 100%;
box-sizing: border-box;
border: 2px solid #000;
text-align: center;
font-weight: bold;
font-size: 24px;
line-height: 100px;
color: #fff;
}
.front {
background-color: #ff0000;
transform: translateZ(150px);
}
.back {
background-color: #00ff00;
transform: translateZ(-150px) rotateY(180deg);
}
.left {
background-color: #0000ff;
transform: translateX(-150px) rotateY(-90deg);
}
.right {
background-color: #ffff00;
transform: translateX(150px) rotateY(90deg);
}
.top {
background-color: #ff8000;
transform: translateY(-150px) rotateX(90deg);
}
.bottom {
background-color: #800080;
transform: translateY(150px) rotateX(-90deg);
}
.middle {
background-color: #ffffff;
transform: translateZ(50px);
}
.middle-left {
background-color: #ffffff;
transform: translateX(-50px);
}
.middle-right {
background-color: #ffffff;
transform: translateX(50px);
}
.middle-top {
background-color: #ffffff;
transform: translateY(-50px);
}
.middle-bottom {
background-color: #ffffff;
transform: translateY(50px);
}
@keyframes spin {
0% {
transform: rotateX(0deg) rotateY(0deg);
}
100% {
transform: rotateX(360deg) rotateY(360deg);
}
}
</style>
</head>
<body>
<div class="rubiks-cube">
<svg id="wave" style="transform:rotate(180deg); transition: 0.3s" viewBox="0 0 1440 490" version="1.1" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient id="sw-gradient-0" x1="0" x2="0" y1="1" y2="0"><stop stop-color="rgba(18, 235, 74, 1)" offset="0%"></stop><stop stop-color="rgba(0, 38.026, 64.07, 1)" offset="100%"></stop></linearGradient></defs><path style="transform:translate(0, 0px); opacity:1" fill="url(#sw-gradient-0)" d="M0,196L26.7,196C53.3,196,107,196,160,236.8C213.3,278,267,359,320,326.7C373.3,294,427,147,480,89.8C533.3,33,587,65,640,98C693.3,131,747,163,800,187.8C853.3,212,907,229,960,196C1013.3,163,1067,82,1120,40.8C1173.3,0,1227,0,1280,32.7C1333.3,65,1387,131,1440,179.7C1493.3,229,1547,261,1600,269.5C1653.3,278,1707,261,1760,212.3C1813.3,163,1867,82,1920,89.8C1973.3,98,2027,196,2080,196C2133.3,196,2187,98,2240,98C2293.3,98,2347,196,2400,236.8C2453.3,278,2507,261,2560,261.3C2613.3,261,2667,278,2720,285.8C2773.3,294,2827,294,2880,285.8C2933.3,278,2987,261,3040,212.3C3093.3,163,3147,82,3200,49C3253.3,16,3307,33,3360,98C3413.3,163,3467,278,3520,318.5C3573.3,359,3627,327,3680,326.7C3733.3,327,3787,359,3813,375.7L3840,392L3840,490L3813.3,490C3786.7,490,3733,490,3680,490C3626.7,490,3573,490,3520,490C3466.7,490,3413,490,3360,490C3306.7,490,3253,490,3200,490C3146.7,490,3093,490,3040,490C2986.7,490,2933,490,2880,490C2826.7,490,2773,490,2720,490C2666.7,490,2613,490,2560,490C2506.7,490,2453,490,2400,490C2346.7,490,2293,490,2240,490C2186.7,490,2133,490,2080,490C2026.7,490,1973,490,1920,490C1866.7,490,1813,490,1760,490C1706.7,490,1653,490,1600,490C1546.7,490,1493,490,1440,490C1386.7,490,1333,490,1280,490C1226.7,490,1173,490,1120,490C1066.7,490,1013,490,960,490C906.7,490,853,490,800,490C746.7,490,693,490,640,490C586.7,490,533,490,480,490C426.7,490,373,490,320,490C266.7,490,213,490,160,490C106.7,490,53,490,27,490L0,490Z"></path></svg>
<div class="cube">
<div class="face front">1</div>
<div class="face back">2</div>
<div class="face left">3</div>
<div class="face right">4</div>
<div class="face top">5</div>
<div class="face bottom">6</div>
<div class="face middle">7</div>
<div class="face middle-left">8</div>
<div class="face middle-right">9</div>
<div class="face middle-top">10</div>
<div class="face middle-bottom">11</div>
</div>
</div>
</body>
</html>