使用 chosen.js,如何将图像添加到下拉项?
最佳答案
通过在选择的列表项上设置background-image
:
.chzn-results li {
background: url('path/to/img.png') no-repeat 3px center;
padding-left: 12px;
}
相应地调整像素数。
关于javascript - 使用 chosen.js,如何将图像添加到下拉项?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12271283/