Make both up/down arrow in select input field - HTML CSS CSS Form

HTML CSS examples for CSS Form:input select

Description

Make both up/down arrow in select input field

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

select {<!--from ww w .  j  a  v  a 2  s .c o  m-->
   background-color: white;
   border: thin solid blue;
   border-radius: 4px;
   display: inline-block;
   font: inherit;
   line-height: 1.5em;
   padding: 0.5em 3.5em 0.5em 1em;
   -webkit-box-sizing: border-box;
   -moz-box-sizing: border-box;
   box-sizing: border-box;
   -webkit-appearance: none;
   -moz-appearance: none;
}
select.classic {
   background-image:    url('https://www.java2s.com/style/demo/InternetExplorer.png');
   background-position: calc(100% - .5rem), 100% 0;
   background-size:  1.5em 1.5em;
   background-repeat: no-repeat;
}
select.classic:focus {
   background-image: url('https://www.java2s.com/style/demo/Safari.png');
   background-position: calc(100% - .5rem), 100% 0;
   background-size:  1.5em 1.5em;
   background-repeat: no-repeat;
   border-color: grey;
   outline: 0;
}


      </style> 
 </head> 
 <body> 
  <p> <select class="classic"> 
    <option value="V">Arizona</option> 
    <option value="W">B</option> 
    <option value="W">C</option> 
    <option value="Y">D</option> </select> </p>  
 </body>
</html>

Related Tutorials