CSS------给字体添加边框时,边框大小无法改变问题

如图:

代码:(需要将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);
});
原文地址:https://www.cnblogs.com/tianhengblogs/p/6369095.html