1. Code
  2. HTML & CSS

Quick Tip: Mimic a Click Event with CSS

Read Time:1 minLanguages:

In today's video quick tip, I'll show you a nifty technique: we'll use plain and simple CSS to mimic click events. The key is to use the helpful :target pseudo class.

Final Source


So what do you think? Pretty neat, huh? On a side note, within the comments, I'd like to know what your thoughts are on my usage of the figcaption element to house those "Zoom" links that are associated with the image. Do you think that's a fair usage of the element? Thanks for watching!

Looking for something to help kick start your next project?
Envato Market has a range of items for sale to help get you started.