0 added
0 removed
Original
2026-01-01
Modified
2026-03-09
1
<p>We can achieve an interesting effect by combining a flexbox and a trick with the :checked ~ selector.</p>
1
<p>We can achieve an interesting effect by combining a flexbox and a trick with the :checked ~ selector.</p>
2
<p>The method works as follows: you can use the checkbox selector to control the order of flex items by changing the direction of the main axis using flex-direction. The effect works best when the direction of the main axis changes from “top to bottom” to “bottom to top”.</p>
2
<p>The method works as follows: you can use the checkbox selector to control the order of flex items by changing the direction of the main axis using flex-direction. The effect works best when the direction of the main axis changes from “top to bottom” to “bottom to top”.</p>
3
<p>In this case, the flex container should be on the same level in the markup as the checkbox.</p>
3
<p>In this case, the flex container should be on the same level in the markup as the checkbox.</p>
4
<p>Thus, we can achieve CSS sorting without having to use JavaScript.</p>
4
<p>Thus, we can achieve CSS sorting without having to use JavaScript.</p>