Skip to content

About

✨ Split Text Hover Effect — HTML/CSS/JS creative UI project.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Split Text Hover Effect

Live Demo HTML CSS JavaScript License: MIT

Recreated from the supplied 9.47-second, 720 × 1280 screen recording.

Effect

The word SPLIT is rendered as two pseudo-element layers:

  • ::before displays the top half using clip-path: inset(0 0 50% 0).
  • ::after displays the bottom half using clip-path: inset(50% 0 0 0).
  • On hover, the upper layer moves upward and turns red (#ff3b30).
  • The lower layer moves downward and turns blue (#007aff).
  • Both halves use a 0.4-second cubic-bezier transition and a slight skew.

CSS declarations readable in the video

The following are transcribed from the visible editor frames:

  • .split-text: position: relative, font-size: 6rem, font-weight: 900, letter-spacing: 5px, color: transparent, cursor: pointer
  • Pseudo-elements: content: attr(data-text), position: absolute, top: 0, left: 0, color: #ffffff, transition on transform for 0.4s
  • Top/bottom clip-path insets: inset(0 0 50% 0) and inset(50% 0 0 0)
  • Hover transforms: translateY(-15px) / translateY(15px) with skewX(-5deg)
  • Hover colors: #ff3b30 and #007aff

The full transition timing function is partially obscured in the recording, so a cubic-bezier easing is used to reproduce the observed smooth movement.

Run

Extract the ZIP and open index.html in a modern browser. No dependencies or build step required.

Files

  • index.html — split text demo and code panel
  • style.css — split-layer clipping and hover animation
  • script.js — click/keyboard toggle and Copy CSS button
  • README.md — source notes and run instructions

Source fidelity

The video is a screen recording, not the original project archive. The visible CSS rules listed above were transcribed; supporting HTML, responsive styles, and JavaScript interactions were added to make the demo complete and runnable. Hidden source code cannot be recovered byte-for-byte.

👨‍💻 Author

mrchandrayee · GitHub

📄 License

MIT License

About

✨ Split Text Hover Effect — HTML/CSS/JS creative UI project.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages