init
This commit is contained in:
11
text_horror/app.js
Normal file
11
text_horror/app.js
Normal file
@@ -0,0 +1,11 @@
|
||||
var i = 0;
|
||||
var txt = 'Hello welcome to TextHorror!';
|
||||
var speed = 50;
|
||||
|
||||
function typeWriter() {
|
||||
if (i < txt.length) {
|
||||
document.getElementById("bubble").innerHTML += txt.charAt(i);
|
||||
i++;
|
||||
setTimeout(typeWriter, speed);
|
||||
}
|
||||
}
|
BIN
text_horror/assets/pixel-font.ttf
Normal file
BIN
text_horror/assets/pixel-font.ttf
Normal file
Binary file not shown.
BIN
text_horror/assets/triangle.png
Normal file
BIN
text_horror/assets/triangle.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 213 B |
51
text_horror/style.css
Normal file
51
text_horror/style.css
Normal file
@@ -0,0 +1,51 @@
|
||||
@font-face {
|
||||
font-family: pixel-font;
|
||||
src: url(assets/pixel-font.ttf);
|
||||
}
|
||||
|
||||
body {
|
||||
color-scheme: dark;
|
||||
background-color: black;
|
||||
color: white;
|
||||
text-align: center;
|
||||
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
||||
}
|
||||
|
||||
#bubble {
|
||||
font-family: pixel-font;
|
||||
text-align: left;
|
||||
font-size: 30px;
|
||||
border-width: 5px;
|
||||
border-style: solid;
|
||||
border-color: white;
|
||||
padding: 30px;
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 70%;
|
||||
height: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.triangle {
|
||||
fill: #fff;
|
||||
position: absolute;
|
||||
right: 17%;
|
||||
bottom: 27%;
|
||||
animation: float 1.5s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes float {
|
||||
0% {
|
||||
transform: translatey(0px);
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: translatey(-20px);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: translatey(0px);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user