Unusual CSS switch
I found a pure-CSS switch that does not use the 'for' attribute of the label to set the 'input' element.
This switch has the 'input' element as the background for the whole switch and uses 'pointer-events: none' on the label to pass clicks through to the 'input' element.
This switch is at:
https://codepen.io/nikkk-me/pen/abvPjeG
There are more tips at: bbingo.xyz/techtips/
Comments
Post a Comment