Is it possible to change the order of list items using CSS3?
For example, if a list is coded in HTML in 1,2,3,4,5 order, but I want it to show in 5,1,2,3,4 order.
I'm using a CSS overlay to modify a Firefox extension, so I can't just change the HTML.
HTML Code
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
</ul>
order
property as in solutions below, however I personally do not prefer it because you can't animate/transition the changing of the order.transformY
. Modifying transform for perf is nice in that it doesn't cause repaint.