Timeline for Can I have an onclick effect in CSS?
Current License: CC BY-SA 4.0
11 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Apr 17, 2023 at 7:57 | comment | added | crow | @MaximillianLaumeister The OP does ask for a solution that does not require JS, but also asks that the solution be CSS (both in the title and the body). The answer you linked is probably one of the closest to a CSS only solution as is possible, nevertheless calling it explicitly CSS only is misleading. The OP seemed to focus on the question rather than their specific situation, which I think is good for a site focused on being applicable to most users, but if I were to guess, I would assume the OP had full access to the CSS, HTML, and JS of their site. | |
| Apr 17, 2023 at 4:55 | comment | added | Maximillian Laumeister | @Kröw The original poster asked for a solution that does not require JS, which Tyler's answer provides. That's what I meant by "CSS-only" in this context. If the original poster was unable to edit the HTML of their website at all (but somehow had full control over the site's CSS), then I assume they would have specified that. | |
| Apr 17, 2023 at 3:25 | comment | added | crow | @MaximillianLaumeister That answer is definitely not CSS only; it requires modifying HTML. | |
| Aug 10, 2022 at 16:39 | history | edited | Peter Mortensen | CC BY-SA 4.0 |
Enabled syntax highlighting (as a result, the diff looks more extensive than it really is - use view "Side-by-side Markdown" to compare).
|
| Dec 24, 2021 at 3:48 | comment | added | user1658543 | @MaximillianLaumeister CSS only? One needs to add an input and a label. | |
| Jan 17, 2019 at 4:09 | review | Suggested edits | |||
| Jan 17, 2019 at 6:55 | |||||
| Sep 22, 2015 at 16:27 | comment | added | Maximillian Laumeister | This answer is outdated. See TylerH's answer for a CSS-only solution to this. | |
| Nov 29, 2012 at 16:46 | comment | added | Sparky | @Kiyura, I guess everything, except some bugs in IE 8 and above. | |
| Nov 29, 2012 at 16:43 | comment | added | jonvuri | @Sparky672, Pretty much everything: caniuse.com/#feat=css-sel2 (IE7 supports :active too but is not listed because it does not support some of the other selectors) | |
| Nov 29, 2012 at 16:43 | vote | accept | Alegro | ||
| Nov 29, 2012 at 16:29 | history | answered | Bojangles | CC BY-SA 3.0 |