An Interest In:
Web News this Week
- April 28, 2024
- April 27, 2024
- April 26, 2024
- April 25, 2024
- April 24, 2024
- April 23, 2024
- April 22, 2024
June 11, 2020 02:42 pm GMT
Original Link: https://css-tricks.com/how-to-reverse-css-custom-counters/
How to Reverse CSS Custom Counters
I needed a numbered list of blog posts to be listed with the last/high first and going down from there. Like this:
5. Post Title4. Post Title3. Post Title2. Post Title1. Post Title
But the above is just text. I wanted to do this with a semantic <ol>
element.
The easy way
This can be done using HTML’ s reversed
property on the <ol>
:
<ol reversed<liThis</li<liList</li<liWill Be</li<liNumbered
… Read article “How to Reverse CSS Custom Counters”
The post How to Reverse CSS Custom Counters appeared first on CSS-Tricks.
Original Link: https://css-tricks.com/how-to-reverse-css-custom-counters/
Share this article:
Tweet
View Full Article