<html>
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <title>Google Font Animation</title>
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="stylesheet" href="style.css">
    </head>
    <body>
        <div class="text one">G</div>
        <div class="text two">o</div>
        <div class="text three">o</div>
        <div class="text four">g</div>
        <div class="text five">l</div>
        <div class="text six">e</div>
    </body>
</html>
@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@100..700&display=swap');

$google-font-roboto: "Roboto", sans-serif;
$google-font-source-sans-pro: "Source Sans Pro", sans-serif;
$roboto-mono: "Roboto Mono", monospace;

body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background: #222;
    display: flex;
    justify-content: center;
    align-items: center;
}
.text {
    font-family: $roboto-mono;
    color: #111;
    font-variation-settings: "wght" var(--font-weight, 100);
    font-size: 7rem;
    margin-left: 1px;
    margin-right: 1px;
}
View Compiled
const timeline = gsap.timeline({repeat: -1});
const chars = document.querySelectorAll(".text");

gsap.set(".one", {color: "#3498DB"});
gsap.set(".two", {color: "#E74C3C"});
gsap.set(".three", {color: "#F1C40F"});
gsap.set(".four", {color: "#3498DB"});
gsap.set(".five", {color: "#27AE60"});
gsap.set(".six", {color: "#E74C3C"});

timeline.from(chars, {opacity: 1, scale: 0, ease: "sine", delay: 0.25})
    .to(".text", {
        "--font-weight": 900,
        duration: .9,
        ease: "sine.inOut",
        stagger: {
            yoyo: true,
            each: 0.1,
            repeat: -1
        }
    }, 1);
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/gsap/3.3.4/gsap.min.js