<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<script type="text/javascript" src="jquery/jquery-3.3.1.min.js"></script>
</head>
<body>
<script>
$(document).ready(function(){
// $('ul>li').css('list-style','none')
$('ul li').css('list-style','none')
// $('label input').css('height','100px')
// $('input button').css('height','100px')
$('label~input').css('background','pink')
})
</script>
<ul>
<li>1</li>
<li>1
<li>2</li>
</li>
<li>1
<div>
<li>3
<li>4
<ul>
<li>5</li>
</ul>
</li>
</li>
</div>
</li>
<li>1</li>
<li>1</li>
</ul>
<form action="">
<label for="">姓名</label>
<input type="text"><button>按钮</button><br>
<input type="text"><button>按钮</button><br>
<input type="text"><button>按钮</button><br>
<input type="text"><button>按钮</button><br>
<input type="text"><button>按钮</button><br>
</form>
</body>
</html>
粽叶飘香2019-02-13 08:52:19
ul>li Only search for son elements, except for son elements, other elements are not found.
ul li Search for all elements
灭绝师太2019-02-11 17:54:18
ul>li: Find the li that is the direct child element of ul
ul li: Find all the li below ul
##