Skip to content

Instantly share code, notes, and snippets.

@CodeMyUI
Created December 16, 2019 00:20
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 CodeMyUI/aa5915eefd81d84018bebbba2be91a7b to your computer and use it in GitHub Desktop.
Save CodeMyUI/aa5915eefd81d84018bebbba2be91a7b to your computer and use it in GitHub Desktop.
Text Effect
<h1>All things are difficult before they are easy.</h1>
<h2>Thomas Fuller</h2>
<h3>CodeMyUI.com</h3>
h1 {
--color1: #42b883;
--color2: #fe346e;
font-family: "Open Sans", sans-serif;
text-align: center;
font-size: 46px;
background: repeating-linear-gradient(
45deg,
var(--color1),
var(--color1) 30px,
var(--color2) 30px,
var(--color2) 60px
);
background-clip: text;
color: transparent;
-webkit-background-clip: text;
animation: 40s linear 0s infinite move;
}
h2 {
--color1: #ffffff;
--color2: #42b883;
font-family: "Open Sans", sans-serif;
text-align: center;
font-size: 20px;
background: repeating-linear-gradient(
45deg,
var(--color1),
var(--color1) 30px,
var(--color2) 30px,
var(--color2) 60px
);
background-clip: text;
color: transparent;
-webkit-background-clip: text;
animation: 40s linear 0s infinite move;
}
h3 {
--color1: #ffffff;
--color2: #fe346e;
font-family: "Open Sans", sans-serif;
text-align: center;
font-size: 10px;
background: repeating-linear-gradient(
45deg,
var(--color1),
var(--color1) 30px,
var(--color2) 30px,
var(--color2) 60px
);
background-clip: text;
color: transparent;
-webkit-background-clip: text;
animation: 40s linear 0s infinite move;
}
body{
background-color: #fbe3b9;
}
@keyframes move {
from {
background-position: 0px;
}
to {
background-position: 1000px;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment