gpt4 book ai didi

HTML 选择下拉箭头样式

转载 作者:行者123 更新时间:2023-11-28 15:41:23 28 4
gpt4 key购买 nike

如何使选择下拉箭头的样式如下图所示。

<select>
<option>Select Any</option>
<option>Option 1</option>
<option>Option 2</option>
</select>

enter image description here

最佳答案

试试这个:

HTML:

<div class="styled-select slate">
<select>
<option>Here is the first option</option>
<option>The second option</option>
<option>The third option</option>
</select>
</div>

CSS:

div { margin: 20px; }

.styled-select {
height: 29px;
overflow: hidden;
width: 240px;
}

.styled-select select {
background: transparent;
border: none;
font-size: 14px;
height: 29px;
padding: 5px; /* If you add too much padding here, the options won't show in IE */
width: 268px;
}

.styled-select.slate {
background: url(http://i.stack.imgur.com/8CVVr.png) no-repeat right center;
height: 34px;
width: 240px;
}

关于HTML 选择下拉箭头样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38218789/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com