Skip to content

Commit

Permalink
Added cool gradient animation to text (#2861)
Browse files Browse the repository at this point in the history
* added cool gradient animation to text

* Delete Art/NotIncorecc-coolGradientText/icon.png

deleted icon.png as it is automatically generated

---------

Co-authored-by: Laureline Paris <32878345+LaurelineP@users.noreply.github.com>
  • Loading branch information
NotIncorecc and LaurelineP authored Oct 31, 2024
1 parent 2c88b1a commit 2078371
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Art/NotIncorecc-coolGradientText/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Gradient Text Card</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="card">
<h1 class="gradient-text">ZTM Hactoberfest 2024</h1>
</div>
</body>
</html>
4 changes: 4 additions & 0 deletions Art/NotIncorecc-coolGradientText/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"artName": "coolGradientText",
"githubHandle": "NotIncorecc"
}
39 changes: 39 additions & 0 deletions Art/NotIncorecc-coolGradientText/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
body {
margin: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background-color: #f0f0f0;
}

.card {
background-color: white;
padding: 50px;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
text-align: center;
}

.gradient-text {
font-size: 2rem;
font-weight: bold;
background: linear-gradient(90deg, red, blue, green, yellow, purple);
background-size: 200% 200%;
background-clip: text;
-webkit-background-clip: text;
color: transparent;
animation: gradient-shift 3s ease-in-out infinite;
}

@keyframes gradient-shift {
0% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0% 50%;
}
}

0 comments on commit 2078371

Please sign in to comment.