<ul> <li>選單1</li> <li>選單2</li> <li>選單3</li> <li>選單4</li> <li>選單5</li> </ul>
ul>li:nth-last-child(-n+3){ color:blue; } ul>li:last-child{ color:red; }
This Pen is owned by minwt on CodePen.
See more by @minwt on CodePen
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.