HTML CSS examples for CSS Selector:after
Select first class which after a specific class
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .wrap .box:nth-of-type(1) {<!-- ww w . ja va 2 s .c o m--> background:red; } </style> </head> <body> <div class="wrap"> <div class="box"> Lorem ipsum dolor sit ame </div> <p>Lorem </p> <div class="box"> Lorem ipsum dolor sit amet, cons </div> </div> </body> </html>