Fully-Faltoo blog by Pratyush

Bio Twitter Screener

24th Dec. 2021

Using 2 lines of CSS for implementing tabs

This is such a cool CSS trick. Cross-browser. No JS.

The tabs are implemented as different sections with different ids. Then the tab contents are hidden using:
section { display: none; }
The CSS which toggles them is:
section:target { display: block; } 
Noice!

Leave a comment

Your email will not be published.