自定义下拉列表箭头

时间:2015-10-08 22:30:10

标签: html css drop-down-menu

我想创建一个下拉列表,但我需要箭头始终可见并且可以根据您在此处看到的内容进行自定义:

https://jsfiddle.net/d388daek/

对于数字输入字段,我如何添加向上箭头,是否可以将⌄用作HTML字符实体而不是箭头?

1 个答案:

答案 0 :(得分:0)

HTML

.styleSelect select {
  background: transparent;
  width: 168px;
  padding: 5px;
  font-size: 16px;
  line-height: 1;
  border: 0;
  border-radius: 0;
  height: 34px;
  /* -webkit-appearance: none; */ /*This line hides the arrow completely*/
  color: #000;
  border-color: rgb(169, 169, 169);
}

.styleSelect {
  width: 140px;
  height: 34px;
  border: 2px solid #000;
  border-color: rgb(170, 170, 170);
}
<div class="styleSelect">
<select class='regularcolor'>
    <option>one</option>
    <option>two</option>
</select>
  </div>
<div class="styleSelect">
<select class='offcolor'>
    <option>one</option>
    <option>two</option>
</select>
  </div>

试试这个,你可以更明确地定制它,使它看起来像某种方式。 希望这会有所帮助。

相关问题