-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstart.html
108 lines (104 loc) · 3.01 KB
/
start.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
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>スプラッシュアニメーション</title>
<style>
body {
margin: 0;
overflow: hidden;
background-color: #3c3c6c;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
transition: opacity 1s;
}
.container {
position: absolute;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.text, .logo {
color: white;
opacity: 0;
}
.logo {
width: 300px;
height: 300px;
transition: transform 0.1s, opacity 0.5s;
}
.text {
font-size: 3em;
margin-top: 20px;
white-space: nowrap;
overflow: hidden;
position: relative;
}
.text::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background-color: #3c3c6c;
transition: left 1s;
}
.text.fade-in::before {
left: 100%;
transition: left 1s;
}
.text.fade-out::before {
left: 100%;
transition: left 1s;
}
.main-content {
display: none;
color: black;
text-align: center;
}
</style>
</head>
<body>
<div class="container">
<img src="assets/images/logo.svg" alt="Logo" class="logo" id="logo">
<div class="text" id="text">Kaisei Information Technologies</div>
</div>
<div class="main-content" id="main-content">
<h1>トップページ乗っかるとこでしょ?</h1>
<p>トップページ早く作ってー</p>
</div>
<script>
window.onload = () => {
setTimeout(() => {
document.getElementById('text').classList.add('fade-in');
document.getElementById('text').style.opacity = '1';
document.getElementById('logo').style.transform = 'translateY(0)';
document.getElementById('logo').style.opacity = '1';
}, 1000);
setTimeout(() => {
document.getElementById('text').classList.remove('fade-in');
document.getElementById('text').classList.add('fade-out');
document.getElementById('text').style.opacity = '0';
document.getElementById('logo').style.transform = 'translateY(-100%)';
document.getElementById('logo').style.opacity = '0';
}, 3500);
setTimeout(() => {
document.body.style.opacity = '0';
}, 4500);
setTimeout(() => {
document.querySelector('.container').style.display = 'none';
document.getElementById('main-content').style.display = 'block';
document.body.style.backgroundColor = 'white';
document.body.style.opacity = '1';
}, 5500);
};
</script>
</body>
</html>