jQuery操作css的相关方法
<body>
<script src="js/1.12.4.js"></script>
<script>
$(function () {
//1.逐个设置
$("div").css("width","100px")
$("div").css("height","100px")
$("div").css("background","red")
//2.链式设置
//注意:大于三步建议分开
$("div").css("width","100px").css("height","100px").css("background","red")
//3.批量设置
$("div").css({
width:"100px",
height:"100px",
backgroundcolor:"red"
});
//4.获取css样式值
console.log($("div").css("width"));
})
</script>
<div></div>
</body>