Skip to content

Instantly share code, notes, and snippets.

@jensgro
Forked from LeaVerou/dabblet.css
Created May 16, 2018 07:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jensgro/7243535c5468d92fe095ca82fef0f5ed to your computer and use it in GitHub Desktop.
Save jensgro/7243535c5468d92fe095ca82fef0f5ed to your computer and use it in GitHub Desktop.
Animated line headings
/**
* Animated line headings
*/
h1 {
display: flex;
align-items: center;
width: 100%;
box-sizing: border-box;
font: bold 250% Palatino, sans-serif;
text-transform: uppercase;
color: black;
}
@keyframes noflex {
to {
flex: 0;
}
}
h1::before,
h1::after {
content: "";
background: currentColor;
height: .1em;
flex: 1;
margin: 0 .2em;
animation: noflex 2s ease-in-out infinite alternate;
}
h1::before {
margin-left: 0;
}
h1::after {
margin-right: 0;
animation-direction: alternate-reverse;
}
<h1>Line headings</h1>
// alert('Hello world!');
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment