126 lines
3.2 KiB
HTML
126 lines
3.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="de">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Animation</title>
|
|
<style>
|
|
body {
|
|
display: flex;
|
|
flex-direction: column; /* Texte untereinander anordnen */
|
|
justify-content: center;
|
|
align-items: center;
|
|
height: 100vh;
|
|
background-color: #000;
|
|
color: #fff;
|
|
font-family: 'Courier New', Courier, monospace;
|
|
overflow: hidden;
|
|
}
|
|
.text, .text1, .text3 {
|
|
font-size: 2em;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
opacity: 0;
|
|
width: 0ch; /* Initiale Breite für die Typing-Animation */
|
|
border-right: 0.15em solid transparent; /* Cursor initial unsichtbar */
|
|
}
|
|
.text1, .text3 {
|
|
margin-top: 20px;
|
|
}
|
|
/* Breite von .text3 auf auto setzen */
|
|
.text3 {
|
|
width: auto;
|
|
}
|
|
.textFirst {
|
|
animation: animationFirst 18s steps(21, end) infinite;
|
|
}
|
|
.textSecond {
|
|
animation: animationSecond 18s steps(10, end) infinite;
|
|
}
|
|
.textThird {
|
|
animation: animationThird 18s linear infinite;
|
|
}
|
|
@keyframes animationFirst {
|
|
0% {
|
|
width: 0ch;
|
|
opacity: 0;
|
|
border-right-color: orange;
|
|
}
|
|
5% {
|
|
opacity: 1;
|
|
}
|
|
15% {
|
|
width: 21ch;
|
|
opacity: 1;
|
|
border-right-color: orange;
|
|
}
|
|
15.1% {
|
|
width: 21ch;
|
|
opacity: 1;
|
|
border-right-color: transparent;
|
|
}
|
|
50% {
|
|
opacity: 1;
|
|
}
|
|
60% {
|
|
opacity: 0;
|
|
}
|
|
100% {
|
|
opacity: 0;
|
|
}
|
|
}
|
|
@keyframes animationSecond {
|
|
15% {
|
|
width: 0ch;
|
|
opacity: 0;
|
|
border-right-color: transparent;
|
|
}
|
|
20% {
|
|
opacity: 1;
|
|
border-right-color: orange;
|
|
}
|
|
30% {
|
|
width: 10ch;
|
|
opacity: 1;
|
|
border-right-color: orange;
|
|
}
|
|
30.1% {
|
|
width: 10ch;
|
|
opacity: 1;
|
|
border-right-color: transparent;
|
|
}
|
|
50% {
|
|
opacity: 1;
|
|
}
|
|
60% {
|
|
opacity: 0;
|
|
}
|
|
100% {
|
|
opacity: 0;
|
|
}
|
|
}
|
|
@keyframes animationThird {
|
|
0%, 60% {
|
|
opacity: 0;
|
|
}
|
|
65% {
|
|
opacity: 1;
|
|
}
|
|
85% {
|
|
opacity: 1;
|
|
}
|
|
90% {
|
|
opacity: 0;
|
|
}
|
|
100% {
|
|
opacity: 0;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="text textFirst">the next BIG thing...</div>
|
|
<div class="text1 textSecond">stay tuned</div>
|
|
<div class="text3 textThird">coming soon</div>
|
|
</body>
|
|
</html>
|