-
Notifications
You must be signed in to change notification settings - Fork 1
/
Main2.html
193 lines (189 loc) · 5.05 KB
/
Main2.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
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
<html>
<head>
<style>
body{
margin:0px;
background:rgb(42, 248, 235);
}
#top{
margin-top:30px;
margin-left:40px;
margin-right: 80px;
}
#logo{
float:left;
}
#logo img{
width:50px;
}
#menu{
float:right;
}
#menu ul{
list-style: none;
font-family: arial;
font-size:12px;
}
#menu ul li{
display: inline-block;
margin-left:100px;
letter-spacing: 2px;
}
#container{
width:100%;
height: 100%;
position: relative;
overflow: hidden;
}
#box{
width:100%;
height: 100%;
position: absolute;
top:20%;
left:4%;
}
#box1,
#box2,
#box3,
#box4,
#box5,
#box6{
width:750px;
height: 200px;
font-family: fantasy;
font-size:11em;
position: relative;
overflow: hidden;
display: inline-block;
}
#box1{
transform:skewY(-15deg);
}
#box2{
transform: skewY(15deg);
margin-left:-5px;
}
#box3{
margin-top:-50;
transform:skewY(-15deg);
}
#box4{
margin-top:-50;
transform:skewY(15deg);
margin-left:-4px;
}
#box5{
margin-top:-50;
transform:skewY(-15deg);
}
#box6{
margin-top:-50;
transform:skewY(15deg);
margin-left:-5px;
}
#text1,
#text2,
#text3,
#text4,
#text5,
#text6{
width:1200px;
height: 200px;
position: absolute;
display: inline-block;
color:white;
transition:all .4s;
}
#text1,
#text3,
#text5{
left:750px;
animation: anim 1s forwards 0.1s;
}
#text2,
#text4,
#text6{
color:black;
left:-750px;
animation: anim2 1s forwards;
}
@keyframes anim{
from{
left:1200px;
}
to{
left:0px;
}
}
@keyframes anim2{
from{
left:1200px;
}
to{
left:-750px;
}
}
#text3,
#text4,
#text5,
#text6{
color:black;
opacity: 0.1;
}
</style>
</head>
<body>
<div id="container">
<div id="top">
<div id="logo">
<img src="LOGO.png"/>
</div>
<div id="menu">
<ul>
<li>SERVICES</li>
<li>PROJECT</li>
<li>ABOUT</li>
<li>CONTACT</li>
</ul>
</div>
</div>
<div id="box">
<div id="box1">
<div id="text1">DAFT CREATION</div>
</div>
<div id="box2">
<div id="text2">DAFT CREATION</div>
</div>
<br>
<div id="box3">
<div id="text3">+DESIGN TEAM</div>
</div>
<div id="box4">
<div id="text4">+DESIGN TEAM</div>
</div>
<br>
<div id="box5">
<div id="text5">+CREATIVE LAB</div>
</div>
<div id="box6">
<div id="text6">+CREATIVE LAB</div>
</div>
</div>
</div>
</body>
<script>
var mainbox = document.querySelector('#container');
var t = document.querySelector('#text1');
var t2 = document.querySelector('#text2');
function cursorfollow(e,mainbox)
{
var con = mainbox.getBoundingClientRect();
var x = ((e.pageX - con.x)*0.5);
t.style.transform = `translate(${x}px,0)`;
t2.style.transform = `translate(${x}px,0)`;
}
mainbox.addEventListener('mousemove',(e)=>{
setInterval(cursorfollow(e,mainbox),1000);
});
</script>
</html>