TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Pure CSS3 Star Wars Lightsaber Checkboxes

3 pointsby scotchioabout 12 years ago

1 comment

scotchioabout 12 years ago
Hey guys. This is my first post, but anyways, here's a fun little code snippet I made today bored that demos the CSS Checkbox "Hack".<p>The Checkbox Hack basically allows you to create simple click events in your HTML document without the use of JavaScript. It's done, like this:<p><pre><code> input[type=checkbox]:checked ~ div {} </code></pre> Pretty interesting, but not really practical for cross-browser support (IE9 and below).