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 结构:
<ol> <li>第 1 项</li> <li>第 2 项</li> <li>第 3 项</li> <li>第 4 项</li> </ol>
默认情况下会渲染出一个从1到4的数字序号列表,如将列表第 2 项的 style 设置为 display: none,则其后面的序号是否会变动?如换成设为 visibility: hidden 呢?为什么?
display: none
visibility: hidden
参考答案: 应用 display: none 的元素不可见、不占据空间、辅助设备无法访问,而且该元素不会被渲染,所以计数器自动跳过第二项,第二项后面的序号从 2 开始递增。 应用 visibility: hidden 的元素虽然在视觉上不可见,但依旧占据布局空间,其计数器仍在运行,不会影响计数器的计数。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
题目:
已知有如下 HTML 结构:
默认情况下会渲染出一个从1到4的数字序号列表,如将列表第 2 项的 style 设置为
display: none
,则其后面的序号是否会变动?如换成设为visibility: hidden
呢?为什么?参考答案:
应用
display: none
的元素不可见、不占据空间、辅助设备无法访问,而且该元素不会被渲染,所以计数器自动跳过第二项,第二项后面的序号从 2 开始递增。应用
visibility: hidden
的元素虽然在视觉上不可见,但依旧占据布局空间,其计数器仍在运行,不会影响计数器的计数。The text was updated successfully, but these errors were encountered: