<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script src="../js/jquery-3.5.1.js"></script>
<script>
//向后查找兄弟元素
//.nextAll()
$(function () {
$("#sel").nextAll().css("color","blue");
});
/*
在jQuery中,对于向后查找兄弟元素,有3种方法
.next()
.nextAll()
.nextUntil()
*/
</script>
</head>
<body>
<ul>
<li>红:red</li>
<li>橙:orange</li>
<li>黄:yellow</li>
<li id="sel">绿:green</li>
<li>青:cyan</li>
<li>蓝:blue</li>
<li>紫:purple</li>
</ul>
</body>
</html>