I have the following on my site:
body {
height: 100%;
width: 100%;
animation: gradient 11s ease infinite;
background: linear-gradient(
to bottom right,
#bd5a80,
#bd5a80,
#7a4d7b,
#bd5a80
);
background-size: 200% 200%;
background-attachment: fixed;
}
@keyframes gradient {
0% {
background-position: 51% 0%;
}
50% {
background-position: 50% 100%;
}
100% {
background-position: 51% 0%;
}
}
h1 {
background-color: white;
color: transparent;
padding: 10px 5px;
border-radius: 0.5rem;
}
<body>
<h1>This is my text</h1>
</body>
I would like the linear-gradient
with animation to show as my text color. But as you can see the h1
has a background-color
set to white, which cannot change. Is it possible to clip
the text so that the color shows through?