Feb 22, 2020
White Arrow icon
Back to all Elements

Thick Underline

An editable thick underline for your Headlines

This is a fairly simple way to add a thick underline to your elements.

We use here 2 interesting tricks:

  1. We Create a background gradient which both colors are positioned at the same point. This way there's no "gradient transition" at all, and the background seems like 2 different colors.
Gradient without "gradient"
  1. Creating a <span> element inside the <H1> element (the span could be created inside any element). This way the background is kept relative to each line.
Span inside the H1

Preview:

Share:

The videos Kurzgesagt channel creates are so beautifully animated, that I almost forget that I learn so much while watching them!

Might also interest you:

3d Video Slider (swiper.js)

Cloneable
CMS
JavaScript

A 3d slider with video items, plays and pauses on click & slide change.

Read more
White Arrow icon

Glossary

Cloneable
JavaScript
CMS

A clonable for creating an Alphabetical glossary

Read more
White Arrow icon

Dynamic Height

Code
Tricks
JavaScript

A (custom code) solution that combines CSS variables and Vanilla JavaScript for the shrinking / growing of browser top & bottom bars.

Read more
White Arrow icon