仅使用CSS更改选择框样式

时间:2017-05-09 11:28:42

标签: html css drop-down-menu

我想做这样的事, 所以我已经可以删除边框,但如何使它像这样?有一些箭头和自定义字体大小?
select box css

1 个答案:

答案 0 :(得分:1)

您可以尝试



select.arrow {
   border-bottom: 1px solid #999;
   border-right: 0px solid #999;
   border-left: 0px solid #999;
   border-top: 0px solid #999;
   width:200px;
   padding: 10px;
  -webkit-appearance: none;
  -moz-appearance: none;
  -ms-appearance: none;
   background: url(../images/pin-point.png) 95% 0 no-repeat; /* Add your image here*/
                        }

<select class="arrow">
    <option>1</option>
    <option>2</option>
    <option>3</option>
 </select>
&#13;
&#13;
&#13;