override CSS set on a pseudo element - HTML CSS CSS Selector

HTML CSS examples for CSS Selector:before

Description

override CSS set on a pseudo element

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
ul {<!-- w  w  w  .j  a  v a 2s . c om-->
   list-style:none;
}

li:before {
   content:"?";
   padding-right:9px;
   color:Chartreuse;
}

.remove:before {
   content:none;
}

.display:before {
   display:none;
}
</style> 
 </head> 
 <body> 
  <ul> 
   <li>Lorem </li> 
   <li>Lor</li> 
   <li>Lorem</li> 
   <li class="display">Lorem </li> 
   <li class="remove">Lorem ips</li> 
  </ul>  
 </body>
</html>

Related Tutorials