精确到小数点:
1.
console.log(window.getComputedStyle(document.getElementById("test")));
2.
$("#test")[0].getBoundingClientRect()
不精确到小数点
1.获取内容宽度
$('.schoolMajorLeftTitle span').eq(i).width()
2.content+padding
$('.schoolMajorLeftTitle span').eq(i).outerWidth()
$("#test")[0].getBoundingClientRect()