HTML CSS examples for CSS:Selector
CSS transitions on universal selector and pseudo elements
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css"> <style id="compiled-css" type="text/css"> body {<!-- w w w. j a v a 2s . c om--> font-family:sans-serif; font-size:19px; } ul { list-style-type:none; } ul li { margin:11px; } ul * { transition:all 0.6s ease; } i { margin-right:11px } a, a i { color:Chartreuse; text-decoration:none } a:hover, a:hover i { color:yellow; } .test-pseudo:before { content:'Pseudo element '; font-weight:bold; } </style> </head> <body> <ul> <li> <a href="#"> <i class="fa fa-envelope"></i>Lorem </a> </li> <li> <a href="#"> <i class="fa fa-phone"></i>Lorem i</a> </li> <li> <a href="#"> <i class="test-pseudo"></i>Lorem </a> </li> </ul> </body> </html>