Typewriter-like animation on text possible?

Hello,
Thanks a lot!
Just one question, what properties do I need to add to have an erase effect?
Thanks for your help

I wrote a code which has all the effects you need. Just modify the last section of the code. You copy it and paste it in a html box. No other js code required. It’s included in the script

/* Global */
html{
min-height: 100%;
overflow: hidden;
}
body{
height: calc(100vh - 8em);
color: #54A4DB;
font-family: ‘helvetica’;
font-size:55px;
background-color: white;
}
.line-1{
position: relative;
top: 50%;
width: 24em;
margin: 0 auto;
border-right: 1px solid rgba(255,255,255,.75);
font-size: 180%;
text-align: center;
white-space: nowrap;
overflow: hidden;
transform: translateY(-50%);
}

/* Animation */
.anim-typewriter{
animation: typewriter 2s steps(44) 1s 1 normal both,
blinkTextCursor 500ms steps(44) 0 infinite normal;
-webkit-animation: typewriter 2s steps(44) 1s 1 normal both,
blinkTextCursor 500ms steps(44) 0 infinite normal;
-moz-animation: typewriter 2s steps(44) 1s 1 normal both,
blinkTextCursor 500ms steps(44) 0 infinite normal;
-o-animation: typewriter 2s steps(44) 1s 1 normal both,
blinkTextCursor 500ms steps(44) 0 infinite normal;
}
@keyframes typewriter{
from{
width: 0;
}
to{
width: 24em;
}
}
@-webkit-keyframes typewriter{
from{
width: 0;
}
to{
width: 24em;
}
}
@-moz-keyframes typewriter{
from{
width: 0;
}
to{
width: 24em;
}
}
@-o-keyframes typewriter{
from{
width: 0;
}
to{
width: 24em;
}
}

@keyframes blinkTextCursor{
from{
border-right-color: rgba(255,255,255,.75);
}
to{
border-right-color: transparent;
}
}
@-webkit-keyframes blinkTextCursor{
from{
border-right-color: rgba(0,0,0,.75);
}
to{
border-right-color: transparent;
}
}
@-moz-keyframes blinkTextCursor{
from{
border-right-color: rgba(255,255,255,.75);
}
to{
border-right-color: transparent;
}
}
@-o-keyframes blinkTextCursor{
from{
border-right-color: rgba(255,255,255,.75);
}
to{
border-right-color: transparent;
}
}

<script> 
var app = document.getElementById('app'); 

var typewriter = new Typewriter(app, {
loop: true
});

typewriter.typeString(‘text1’)
.pauseFor(2500)
.deleteAll()
.typeString(‘text2’)
.pauseFor(2500)
.deleteAll()
.typeString(‘text3’)
.pauseFor(2500)
.start();

@danieltanasec Hi Daniel.
Thanks a lot. Works very well :slight_smile:

did u ever figure this out?

@danieltanasec Hi Daniel, sorry if this is a really obvious question (I’ve never used HTML before). I was wondering how I would add more words to the type string, I’ve tried repeating the code but it doesn’t seem to be working for me. Thank you :slight_smile:

@serena-anslow Hey. In the last section just add what you like:

typewriter.typeString(‘text1’)
.pauseFor(2500)
.deleteAll()
.typeString(‘text2’)
.pauseFor(2500)
.deleteAll()
.typeString(‘text3’)
.pauseFor(2500)
.start();

The code is also set for loop in:

var typewriter = new Typewriter(app, {
loop: true
});

@danieltanasec amazing, thank you!

I tried to input the html code into my site but it shows the html is broken and doesnt show up on live site, but shows on editor. Heres my input: any help??

/* Global */ html{ min-height: 100%; overflow: hidden; } body{ height: calc(100vh - 8em); color: #ffff; font-family: raleway; font-size:30px; background-color: transparent; } .line-1{ position: relative; top: 50%; width: 24em; margin: 0 auto; border-right: 1px solid rgba(255,255,255,.75); font-size: 180%; text-align: center; white-space: nowrap; overflow: hidden; transform: translateY(-50%); } /* Animation */ .anim-typewriter{ animation: typewriter 2s steps(44) 1s 1 normal both, blinkTextCursor 500ms steps(44) 0 infinite normal; -webkit-animation: typewriter 2s steps(44) 1s 1 normal both, blinkTextCursor 500ms steps(44) 0 infinite normal; -moz-animation: typewriter 2s steps(44) 1s 1 normal both, blinkTextCursor 500ms steps(44) 0 infinite normal; -o-animation: typewriter 2s steps(44) 1s 1 normal both, blinkTextCursor 500ms steps(44) 0 infinite normal; } @keyframes typewriter{ from{ width: 0; } to{ width: 24em; } } @-webkit-keyframes typewriter{ from{ width: 0; } to{ width: 24em; } } @-moz-keyframes typewriter{ from{ width: 0; } to{ width: 24em; } } @-o-keyframes typewriter{ from{ width: 0; } to{ width: 24em; } } @keyframes blinkTextCursor{ from{ border-right-color: rgba(255,255,255,.75); } to{ border-right-color: transparent; } } @-webkit-keyframes blinkTextCursor{ from{ border-right-color: rgba(0,0,0,.75); } to{ border-right-color: transparent; } } @-moz-keyframes blinkTextCursor{ from{ border-right-color: rgba(255,255,255,.75); } to{ border-right-color: transparent; } } @-o-keyframes blinkTextCursor{ from{ border-right-color: rgba(255,255,255,.75); } to{ border-right-color: transparent; } }
</section> 
<script> 

var app = document.getElementById('app'); 

var typewriter = new Typewriter(app, {

loop: false 

});

typewriter.typeString(‘Design.’)

.pauseFor(1500) 

.deleteAll() 

.typeString('Create.') 

.pauseFor(1500) 

.deleteAll() 

.typeString('Innovate.') 

.pauseFor(1500)

.deleteAll()

.typeString(‘The Quorum Group.’)

.pauseFor(1500)

.start(); 

Your font color is white :). In body{}. If I change to black the text shows up fine in chrome

Hi Daniel how do I change the font speed typed? I have tried to change the typewriter 2s speed however this doesn’t change anything.

I found out a much much but much simple version

Some text which

just play with the settings in js code. Also more setting here GitHub - mattboldt/typed.js: A JavaScript Typing Animation Library

@danieltanasec

I’m using this code for the text, where would an amendment to speed go?

apologies in advance for the novice response!

/* Global */ html{ min-height: 100%; overflow: hidden; } body{ height: calc(100vh - 8em); color: #FFFFFF; font-family: 'calibri'; font-size:85px; background-color: transparant; } .line-1{ position: relative; top: 50%; width: 24em; margin: 0 auto; border-right: 1px solid rgba(255,255,255,.75); font-size: 180%; text-align: center; white-space: nowrap; overflow: hidden; transform: translateY(-50%); } /* Animation */ .anim-typewriter{ animation: typewriter 0.1s steps(25) 0.05s 1 normal both, blinkTextCursor 500ms steps(5) 0 infinite normal; -webkit-animation: typewriter 0.05s steps(5) 0.05s 1 normal both, blinkTextCursor 500ms steps(25) 0 infinite normal; -moz-animation: typewriter 0.05s steps(25) 0.05s 1 normal both, blinkTextCursor 500ms steps(25) 0 infinite normal; -o-animation: typewriter 0.05s steps(25) 0.05s 1 normal both, blinkTextCursor 500ms steps(25) 0 infinite normal; } @keyframes typewriter{ from{ width: 0; } to{ width: 24em; } } @-webkit-keyframes typewriter{ from{ width: 0; } to{ width: 24em; } } @-moz-keyframes typewriter{ from{ width: 0; } to{ width: 24em; } } @-o-keyframes typewriter{ from{ width: 0; } to{ width: 24em; } } @keyframes blinkTextCursor{ from{ border-right-color: rgba(255,255,255,.75); } to{ border-right-color: transparent; } } @-webkit-keyframes blinkTextCursor{ from{ border-right-color: rgba(0,0,0,.75); } to{ border-right-color: transparent; } } @-moz-keyframes blinkTextCursor{ from{ border-right-color: rgba(255,255,255,.75); } to{ border-right-color: transparent; } } @-o-keyframes blinkTextCursor{ from{ border-right-color: rgba(255,255,255,.75); } to{ border-right-color: transparent; } }
/* Global */ html{ min-height: 100%; overflow: hidden; } body{ height: calc(100vh - 8em); color: #FFFFFF; font-family: 'calibri'; font-size:85px; background-color: transparant; } .line-1{ position: relative; top: 50%; width: 24em; margin: 0 auto; border-right: 1px solid rgba(255,255,255,.75); font-size: 180%; text-align: center; white-space: nowrap; overflow: hidden; transform: translateY(-50%); } /* Animation */ .anim-typewriter{ animation: typewriter 0.1s steps(25) 0.05s 1 normal both, blinkTextCursor 500ms steps(5) 0 infinite normal; -webkit-animation: typewriter 0.05s steps(5) 0.05s 1 normal both, blinkTextCursor 500ms steps(25) 0 infinite normal; -moz-animation: typewriter 0.05s steps(25) 0.05s 1 normal both, blinkTextCursor 500ms steps(25) 0 infinite normal; -o-animation: typewriter 0.05s steps(25) 0.05s 1 normal both, blinkTextCursor 500ms steps(25) 0 infinite normal; } @keyframes typewriter{ from{ width: 0; } to{ width: 24em; } } @-webkit-keyframes typewriter{ from{ width: 0; } to{ width: 24em; } } @-moz-keyframes typewriter{ from{ width: 0; } to{ width: 24em; } } @-o-keyframes typewriter{ from{ width: 0; } to{ width: 24em; } } @keyframes blinkTextCursor{ from{ border-right-color: rgba(255,255,255,.75); } to{ border-right-color: transparent; } } @-webkit-keyframes blinkTextCursor{ from{ border-right-color: rgba(0,0,0,.75); } to{ border-right-color: transparent; } } @-moz-keyframes blinkTextCursor{ from{ border-right-color: rgba(255,255,255,.75); } to{ border-right-color: transparent; } } @-o-keyframes blinkTextCursor{ from{ border-right-color: rgba(255,255,255,.75); } to{ border-right-color: transparent; } }

@ Andreas Kviby i am writing to ask you how can i simply do the typewriter effect in the landing page?

Hey. Just copy the code I provided in a html frame

@danieltanasec i need this code for the js event in wix, I don’t how can I do it in html

@urbino1233 you have html frame in wix components

@danieltanasec thanks a lot

any ideas daniel?

@marquis69 Use the script I provided and change typeSpeed/backSpeed

See the Typewriter example .