We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
答案:
浏览器从最右边的选择器(关键选择器)根据关键选择器,浏览器从 DOM 中筛选出元素,然后向上遍历被选元素的父元素,判断是否匹配。选择器匹配语句链越短,浏览器的匹配速度越快。
例如,对于形如p span的选择器,浏览器首先找到所有<span>元素,并遍历它的父元素直到根元素以找到<p>元素。对于特定的<span>,只要找到一个<p>,就知道'`已经匹配并停止继续匹配。
p span
<span>
<p>
解析:参考
The text was updated successfully, but these errors were encountered:
No branches or pull requests
答案:
浏览器从最右边的选择器(关键选择器)根据关键选择器,浏览器从 DOM 中筛选出元素,然后向上遍历被选元素的父元素,判断是否匹配。选择器匹配语句链越短,浏览器的匹配速度越快。
例如,对于形如
p span
的选择器,浏览器首先找到所有<span>
元素,并遍历它的父元素直到根元素以找到<p>
元素。对于特定的<span>
,只要找到一个<p>
,就知道'`已经匹配并停止继续匹配。解析:参考
The text was updated successfully, but these errors were encountered: