make a drop down list with color instead of string text - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Color

Description

make a drop down list with color instead of string text

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">

.color-selector
{
   width:150px;
}


      </style> 
 </head> <!--from w  w w  .  j a va 2 s. c  om-->
 <body> 
  <select class="color-selector"> 
     <option style="background-color:#FF0000;"></option> 
     <option style="background-color:#00FF00;"></option> 
     <option style="background-color:#0000FF;"></option> </select>  
 </body>
</html>

Related Tutorials