在< select>中添加图片的最佳方法<选项> [英] The best way to add images in <select> <option>

查看:128
本文介绍了在< select>中添加图片的最佳方法<选项>的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

实际上,在中添加图片的最佳方式是< select> <选项>
我需要在我的列表中添加国家/地区标志。我使用AngularJS和jQuery。
跨浏览器对我很重要。我尝试使用 background-image 和几个旧的jquery插件,但它在Chrome中并不适用。

我可以在列表项中添加图像吗?任何帮助将不胜感激。

解决方案

我找到了一个不错的解决方案,希望它能帮助您: $ b

将图像添加到具有跨浏览器兼容性的选择列表


What is actually the best way to add images in <select> <option>? I need to add country flags in my list. I use AngularJS and jQuery. Cross-browser is important for me. I try background-image and few old jquery plugins, but it dosen't works in Chrome.

So how can I add image in list items? Any help will be appreciate.

解决方案

I found a nice solution I hope it helps you:

Adding image to select list with cross browser compatibility

这篇关于在&lt; select&gt;中添加图片的最佳方法&LT;选项&GT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆