Create a Sliding Button Effect Only Using CSS3 - Code Tutorial

Caler Edwards on YouTubeWatch on YouTube

SaveMark complete

Sign in to save videos and track what you’ve finished.

BeginnerDesign Engineering18 min

About this video

Shows how to build two buttons that share a sliding background colour using only CSS3. It uses a span to target a hover state and a separate class for a second hover effect.

What you’ll learn

  • Build a button with a sliding background colour using only CSS3
  • Use a span element to target a hover state
  • Apply a second hover effect with a dedicated class