Nov 3, 2017 09:53 AM
(This post was last modified: Nov 5, 2017 03:56 PM by Тоху.)
I wrote this for some project I'm working on and recommended it be used for the menu here on the top left of the form for non-js compatibility, so I figured I'd post it here.
Here's all the CSS you need:
Spoiler (Click to View)
And some html:
Spoiler (Click to View)
You may be able to substitute input[type=checkbox]:checked for #collapseobj:checked to use with multiple checkboxes, but I haven't tested this (though it is working here https://codepen.io/tomasz86/pen/wuzcK)
What's going on here? Well, we're using the checkbox hack. When the checkbox (which we give content to with css) is clicked, it will change the css of the collapseobj class, back and forth.
Now, I haven't positioned the button in that short little html snippet so you'll have to do it yourself. But that's how it's done.
I've found using opacity fading with the animation makes it appear a little smoother.
Hope you all can employ this cool css trick and get rid of your JS! 🎉
Here's all the CSS you need:
Spoiler (Click to View)
And some html:
Spoiler (Click to View)
You may be able to substitute input[type=checkbox]:checked for #collapseobj:checked to use with multiple checkboxes, but I haven't tested this (though it is working here https://codepen.io/tomasz86/pen/wuzcK)
What's going on here? Well, we're using the checkbox hack. When the checkbox (which we give content to with css) is clicked, it will change the css of the collapseobj class, back and forth.
Now, I haven't positioned the button in that short little html snippet so you'll have to do it yourself. But that's how it's done.
I've found using opacity fading with the animation makes it appear a little smoother.
Hope you all can employ this cool css trick and get rid of your JS! 🎉
Does anyone want to mine bitcoin with me in 2011?


aerox.design![[Image: AAjOYL.gif]](https://vgy.me/AAjOYL.gif)