Jump to content

Typing animation custom font

Recommended Posts

Posted

Hello, 

I wan to put an animation in that looks as if the words for a heading are being typed. Does anyone have the code for this? I've tried one I found on google but the spacing of the words is weird, it puts them on top of each other. 

Thanks for the help in advance!

Posted

Insert this into the CSS Panel:

/*CSS Written Text*
.statictext{
  color: white;
    font-size: 55px;
    padding: 15px;
    font-family: sans-serif;
}
.writtentext{
  color: white;
    border-right: 2px solid red;
    font-size: 55px;
    font-family: sans-serif;
    color: rgb(255, 30, 0);
}

/*END CSS Written Text*

Insert this into the Page Injection area of the Header:

/*Insert Into header - Written Text*/
<script src="https://cdnjs.cloudflare.com/ajax/libs/typed.js/2.0.11/typed.min.js" integrity="sha512-BdHyGtczsUoFcEma+MfXc71KJLv/cd+sUsUaYYf2mXpfG/PtBjNXsPo78+rxWjscxUYN2Qr2+DbeGGiJx81ifg==" crossorigin="anonymous"></script>

Insert this into a codeblock on the page where you would like the text to appear.  It's recommended that you use a Classic Editor Section instead of Fluid Engine:

<div class="statictext">I'm</div>
    <div class="writtentext"></div>

<script>
   var typing=new Typed(".writtentext", {
       strings: ["", "Youtuber", "Freelancer", "Graphics Designer", "Web Designer", "Web Developer"],
       typeSpeed: 100,
       backSpeed: 40,
       loop: true,
   });
</script>

 

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.