这是使用 ms-Dropdown :https://github.com/marghoobsuleman/ms-Dropdown
数据资源是json。但是你不需要使用json。如果你愿意,你可以使用 css。
CSS 示例:https://github.com/marghoobsuleman/ms-Dropdown/tree/master/examples
Json 示例:http://jsfiddle.net/tcibikci/w3rdhj4s/6
HTML
<div id="byjson"></div>
脚本
<script>
var jsonData = [
{description:'Choos your payment gateway', value:'', text:'Payment Gateway'},
{image:'https://via.placeholder.com/50', description:'My life. My card...', value:'amex', text:'Amex'},
{image:'https://via.placeholder.com/50', description:'It pays to Discover...', value:'Discover', text:'Discover'},
{image:'https://via.placeholder.com/50', title:'For everything else...', description:'For everything else...', value:'Mastercard', text:'Mastercard'},
{image:'https://via.placeholder.com/50', description:'Sorry not available...', value:'cash', text:'Cash on devlivery', disabled:true},
{image:'https://via.placeholder.com/50', description:'All you need...', value:'Visa', text:'Visa'},
{image:'https://via.placeholder.com/50', description:'Pay and get paid...', value:'Paypal', text:'Paypal'}
];
$("#byjson").msDropDown({byJson:{data:jsonData, name:'payments2'}}).data("dd");
}
</script>