这是我现有的下拉列表:
@Html.DropDownList("ddlMailSignature", (IEnumerable<SelectListItem>)ViewBag.MailSignature, "Mail Signature", new { @class = "select2" })
是否可以使用我在应用程序中添加的图像来获得相同的下拉列表?下面是我的图片的 CSS。
.MailSignature {
background: url(../img/signature.png) no-repeat;
width: 20px;
height: 15px;
float: right;
}
最佳答案
目前默认下拉列表无法做到这一点。但是您可以尝试使用可以通过事件打开/关闭的选择框插件。 检查this answer .
关于javascript - 单击我们在 css 中添加的图像图标的下拉列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35751236/