CSS3 :after pseudo element with input - HTML CSS CSS Form

HTML CSS examples for CSS Form:input

Description

CSS3 :after pseudo element with input

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">
input,<!--  www  .  j  a  v  a 2s.c o m-->
textarea {
}
.req {
   display:block;
}

.req:after {
   content:"*";
   margin:0 0 0 0.2em;
   color:Chartreuse;
}
</style> 
 </head> 
 <body> 
  <span class="req"> <button>Lorem </button> </span> 
  <span class="req"> <input type="text"> </span> 
  <span class="req"> <input type="radio"> </span> 
  <span class="req"> <input type="checkbox"> </span> 
  <span class="req"> <textarea></textarea> </span>  
 </body>
</html>

Related Tutorials