Headings
Your content
Let’s start with some HTML on a page:
Then, let’s add typetura.css
. It should ideally go in the <head>
.
We want to style the .heading
element. Let’s attach Typetura’s behavior to it by adding the class tt
.
Defining a container
Let’s say we want to have the headline scale with the container it is in. We can define this by either adding a cq
class to <article>
or by adding article{ container-type: inline-size; }
to our CSS.
Your styles
Now we can style this using CSS keyframe animations. We’ll start by creating an animation and attaching that to our heading.
Additional styling
You did it! Now let’s add more styles to both the keyframes and our regular ruleset for the heading. See the Typetura style reference for more information.
See the Pen Typetura Headings Tutorial by Scott Kellum (@scottkellum) on CodePen.