Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions submissions/examples/text-spotlight-55614/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Text Spotlight Shining Mask Effect

## What does this do?
A typographic effect where a bright spotlight appears to shine and pan across a dark heading. This is achieved entirely in CSS using `background-clip: text`, `color: transparent`, and an animated `linear-gradient` background position.

## How is it used?
```html
<h1 class="ease-text-spotlight">Pro Edition</h1>
```

## Why does it fit EaseMotion CSS?
It provides an incredibly polished, premium text animation that relies entirely on CSS, creating a looping keyframe animation that is both performant and beautiful. It requires zero extra DOM elements (just the text tag itself) and completely avoids heavy WebGL or JS canvas implementations.

## Tech Stack
- HTML
- CSS (No JavaScript)
23 changes: 23 additions & 0 deletions submissions/examples/text-spotlight-55614/demo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Text Spotlight Shining Mask Demo</title>
<link rel="stylesheet" href="style.css">
<style>
body {
margin: 0;
height: 100vh;
background-color: #0b0b0b;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
display: flex;
justify-content: center;
align-items: center;
}
</style>
</head>
<body>
<h1 class="ease-text-spotlight">Pro Edition</h1>
</body>
</html>
32 changes: 32 additions & 0 deletions submissions/examples/text-spotlight-55614/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
.ease-text-spotlight {
font-size: 4rem;
font-weight: 800;
text-transform: uppercase;
letter-spacing: 2px;

/* The background defines the text color and the spotlight */
background: linear-gradient(
45deg,
#222 20%,
#fff 40%,
#fff 60%,
#222 80%
);

/* Make the background 200% width so we can animate it moving */
background-size: 200% auto;

/* Clip the background strictly to the text */
color: transparent;
-webkit-background-clip: text;
background-clip: text;

/* Animate the background position */
animation: ease-spotlight-shine 3s linear infinite;
}

@keyframes ease-spotlight-shine {
to {
background-position: 200% center;
}
}
Loading