![](/img/trans.png)
[英]How to remove the default arrow icon from a dropdown list (select element)?
[英]How to change the arrow icon from a select list
您可以使用appearnace: none
CSS 屬性,帶有::after
選擇器。 您可以在::after
使用content
屬性后使用自定義符號。
div { position: relative; float: left; min-width: 200px; margin: 50px 33%; } div::after { content: '>'; font: 17px "Consolas", monospace; color: #333; transform: rotate(90deg); right: 15px; top: 18px; padding: 0 0 2px; position: absolute; pointer-events: none; } div select { appearance: none; -moz-appearance: none; -webkit-appearance: none; display: block; width: 100%; max-width: 320px; height: 50px; float: right; margin: 5px 0px; padding: 0px 24px; font-size: 16px; background-color: #ffffff; }
<div> <label> <select> <option selected> Select Box </option> <option>Option 1</option> <option>Option 2</option> <option>Option 3</option> </select> </label> </div>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.