使用chosen.js,我该如何在下拉菜单项中添加图片?
background-image
:.chzn-results li {
background: url('path/to/img.png') no-repeat 3px center;
padding-left: 12px;
}
根据需要调整像素计数。
li.active-result {
background: url('path/to/img.png') no-repeat 3px center;
text-indent:2em;
}
background
而不是background-image
。 - Richard