A small library that gives your text that typewriter effect and makes it blink too 😤
- Typing effect
ZTF(elementID).type(SET_SPEED_TYPING, SET_SPEED_DELETING);
- Blinking Effect
ZTF(Element_ID).type(SET_INTERVAL_BLINKING);
- Custom Css for the typing effect
For a more fancy look add the following css to animate the cursor
The cursor won't appear by itself 🧙♂️, you should put it in a span or whatever tag you like as long as it's gonna be inline with the text.
👉 | 👈
Copy this in you css tag or file Or include the file i added , do as you please.
.my-fancy-cursor {
color: rgb(255, 255, 255);
animation: blink 0.5s ease infinite;
opacity: 0;
}
@keyframes blink {
100% {
opacity: 1;
}
}
- Example with the custom Css
<span id="YOUR_ID">i'm still learning please be kind </span>
<span class="my-fancy-cursor">|</span>
<script>
ZTF(elementID).type(SET_SPEED_TYPING, SET_SPEED_DELETING);
</script>
So far you can only target one element per call , bummer i know ...
hopefully, as i expand my knowledge in js , i'll figure out a way to
fix this issue 😫 .
Any help improving this and adding more stuff is welcomed ! i'm still learning JS .
you can contact me at [email protected] or via my portfolio
💎DacteeloJS💎 released under the MIT License.
Made with 💘 by a 👨💻 on a 💻 | 2020 | ZTF666 - N.EA