gpt4 book ai didi

css - 如何使用css设计选择框

转载 作者:太空宇宙 更新时间:2023-11-03 23:43:59 25 4
gpt4 key购买 nike

大家好,谁能帮助我如何使用 css 制作我的选择框,就像图片中那样。

我是网络开发的新手,谁能帮我做这种设计?

htm代码:

<select class="black" >
<option>Here is the first option</opstion>
<option>red</opstion>
<option>white</opstion>
</select>

enter image description here

最佳答案

.black {
background: #444444;
border: 1px solid #26487f;
border-radius: 1px;
color: #fff;
outline: 1px solid #a5c7fe;
padding: 6px 10px;
}

JSFiddle demo .

您还需要修复 HTML 中的错误:</opstion>应该是 </option> .

关于css - 如何使用css设计选择框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22038513/

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