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
这题的答案是正确的,这道题的前提是 “在HTML文本中”,HTML文本中的 root 总是指向 html 元素的。 在W3C中有明确的说明 : 请戳这里查看 CSS3 :root 选择器
root
<ul class="shopping-list" id="awesome"> <li><span>Milk</span></li> <li class="favorite" id="must-buy"><span class="highlight">Sausage</span></li> </ul>
#awesome .favorite:not(#awesome) .highlight { color: red; } #awesome .highlight:nth-of-type(1):nth-last-of-type(1) { color: blue; }
这里考察的是对CSS选择器优先级的掌握,答案应该是 red。
<div id="test1"> <span id="test2"></span> </div>
#test1 { display: none; } #test2 { background-image: url('mypic.jpg'); visibility: hidden; }
答案是 会被加载。这里考察的是CSS样式对背景图加载的影响,visibility: hidden 只是不显示,节点在文本流中仍然占有一席之位,背景图仍然会被加载。
visibility: hidden
The text was updated successfully, but these errors were encountered:
关于18的问题,验证过后,确实不会被加载,因为test1的display为none,导致整个元素不被加载,看浏览器的NetWork就会发现这个问题
Sorry, something went wrong.
No branches or pull requests
CSS 部分问题与解答中
6. 在HTML文本中,伪类:root总是指向html元素?
这题的答案是正确的,这道题的前提是 “在HTML文本中”,HTML文本中的
root
总是指向 html 元素的。在W3C中有明确的说明 : 请戳这里查看 CSS3 :root 选择器
14. 如下代码中文本“Sausage”的颜色是?
这里考察的是对CSS选择器优先级的掌握,答案应该是 red。
18. mypic.jpg 会被浏览器加载吗?
答案是 会被加载。这里考察的是CSS样式对背景图加载的影响,
visibility: hidden
只是不显示,节点在文本流中仍然占有一席之位,背景图仍然会被加载。The text was updated successfully, but these errors were encountered: