tianhengblogs

如图:

代码:(需要将display属性设置为inline-block,在设置height和line-height调整位置)

//品牌点击
$(".li-brand").click(function () {
  var str = "";
  str += "<div style = \'display:inline;border:1px solid orange;padding:4px\'>品 牌: " + $(this).text() + "<em style = \'display:inline-block;height:14  px;line-height:15px;cursor:pointer;border:1px solid orange\'>X</em></div>";
  $(".select-brand-x").html(str);
});

 

分类:

技术点:

相关文章: