Overview
Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Learn how to create a CSS-only directionally aware button in this 17-minute tutorial. Explore the power of :has() selector to achieve dynamic effects without JavaScript. Start with HTML and basic CSS, then set up hover zones and add pseudo-elements for the desired effect. Discover techniques to make the effect work from the middle and sides, improve the overall appearance, and enhance the button's look when releasing a click. Gain insights into browser support and access additional resources on CSS techniques. Perfect for web developers looking to enhance their CSS skills and create interactive UI elements without relying on JavaScript.
Syllabus
- Introduction
- The HTML and starting CSS
- Setting up the hover zones
- Adding a pseudo-element for the effect
- Making the effect work from the middle
- Making the effect work from the sides
- Improving how it looks
- Improving the look when you let go of the click
- Browser support
Taught by
Kevin Powell