-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathintro.html
85 lines (72 loc) · 1.78 KB
/
intro.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
<!DOCTYPE html>
<html>
<style>
body, html {
margin: 0;
padding: 0;
height: 100%;
overflow: hidden;
font-family: Arial, sans-serif;
}
.intro-animation {
position: absolute;
width: 100%;
height: 100%;
background-color: grey;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.strongdog, .xp {
font-size: 50px;
font-weight: bold;
display: inline-block;
opacity: 0;
}
.strongdog {
color: black;
animation: slamScreen 1s ease forwards, slideRight 1s 2s forwards;
}
.xp {
color: orange;
animation: slamScreen 1s 0.5s ease forwards, slideLeft 1s 2.5s forwards;
}
@keyframes slamScreen {
0% { transform: translateY(100vh); }
60% { transform: translateY(0); }
70% { transform: translateY(-10px); }
80% { transform: translateY(0); }
100% { opacity: 1; }
}
@keyframes slideRight {
to { transform: translateX(100vw); }
}
@keyframes slideLeft {
to { transform: translateX(-100vw); }
}
.game-container {
display: none;
}
</style>
<head>
<title>StrongDog XP Game</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="intro-animation">
<div class="strongdog">StrongDog</div>
<div class="xp">XP</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
const intro = document.querySelector('.intro-animation');
const gameContainer = document.querySelector('.game-container');
setTimeout(() => {
intro.style.transform = 'translateY(-100%)';
setTimeout(() => {
gameContainer.style.display = 'block';
}, 1000); // Delay before showing game
}, 3500); // Wait for the animations to complete
});
</script>