我们也可以使用jQuery直接更改HTML元素的CSS。
Query有一个名为.css()的函数,它允许您更改元素的CSS。
.css()
<script> $(document).ready(function() { $("#target1").css("color", "red"); }); </script>