change the triangle icon in drop down list to a customized icon in html - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:UL Element

Description

change the triangle icon in drop down list to a customized icon in html

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">
.dropdown p {<!--   ww w. j  ava 2s .co m-->
   display:inline-block;
   font-weight:bold;
}

.dropdown select {
   border:2px solid Chartreuse;
   -webkit-appearance:none;
   -moz-appearance:none;
   background:url('https://www.java2s.com/style/demo/Google-Chrome.png') no-repeat right;
   background-position:51px -14px;
   width:100px;
   text-indent:0.2px;
   text-overflow:"";
   color:yellow;
}

select::-ms-expand {
   display:none;
}
</style> 
 </head> 
 <body> 
  <div class="dropdown"> 
   <p>Lorem </p> 
   <select> <option>Lorem ip</option> <option>Lorem </option> <option>Lorem i</option> </select> 
  </div>  
 </body>
</html>

Related Tutorials