See the original repository
Its under the MIT License
- It's a nojs code to make the typewriter animation;
- It's for people that don't want to use JavaScript code because the internet have users that disable the javascript in browser.
- The secret is in css; We grow the width of h2 for reveal words.
- It's required the overflow hidden and the font be a monotype.
- Change the
--linex-width: xpx;
for--linex-width: fit-content;
- So, use
ctrl + shift + i
, open the dev's browser menu; - Inspect the h2 element and see the width.
- The
x
are variables,--linex-width
can be--line1-width
,--line2-width
/xpx
can be300px
- --font-size: size;
- --font-color: color;
- --line-aproximate: size;
- --cursor-color: color;
- --cursor-size: size;
- --time-to-start: time;
- --linex-width: size;
- --linex-range: int;
- --linex-time: time;
- The first line starts before the
--time-to-start
- so the blink animation runs with the width animation
- the width animation was made in steps, this steps are the
--linex-range
.
- the width animation was made in steps, this steps are the
- before this, is executed the next line
- the first line must to have a not transparent
border-rigth
, unlike the others, that must be a solid color; - the last line don't have a
cursor-disabled
animation, it must be infinite.