gpt4 book ai didi

css - 删除 ASP.NET MVC3 中的下拉列表向下箭头符号

转载 作者:行者123 更新时间:2023-11-28 09:03:25 25 4
gpt4 key购买 nike

我想隐藏 @Html.DropDownList 中的向下箭头符号。如何覆盖默认的下拉列表样式。

请看下图。

enter image description here

最佳答案

您可以使用 css 为您的下拉菜单设置自定义外观:

.customDropDown { -webkit-appearance: none; -moz-appearance: none; 
// add background image what you like
}

并将此类添加到您的下拉列表中:

@Html.DropDownList("DropDownID", String.Empty, new {@class="customDropDown "} )

关于css - 删除 ASP.NET MVC3 中的下拉列表向下箭头符号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14827427/

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