代码没有问题,颜色没有变化
<script src="https://www.imooc.com/static/lib/jquery/1.9.1/jquery.js"></script>
<script>
var div = document.getElementsByTagName('div');
var $div = $(div);
var $first = $div.first();
$first.css('color','red');
</script>
<div>元素一</div>
<div>元素二</div>
<div>元素三</div>