2018-10-10 18:03:03 -04:00
|
|
|
---
|
|
|
|
id: 587d7788367417b2b2512aa3
|
|
|
|
challengeType: 0
|
2020-02-11 17:06:41 +08:00
|
|
|
videoUrl: 'https://scrimba.com/c/crVrDh8'
|
|
|
|
forumTopicId: 301022
|
2020-10-01 17:54:21 +02:00
|
|
|
title: 使用 footer 元素使屏幕阅读器更容易导航
|
2018-10-10 18:03:03 -04:00
|
|
|
---
|
|
|
|
|
|
|
|
## Description
|
2020-02-11 17:06:41 +08:00
|
|
|
<section id='description'>
|
|
|
|
与<code>header</code>和<code>nav</code>类似,<code>footer</code>也具有语义化特性,可以使辅助设备快速定位到它。它位于页面底部,用于呈现版权信息或者相关文档链接。
|
|
|
|
</section>
|
2018-10-10 18:03:03 -04:00
|
|
|
|
|
|
|
## Instructions
|
2020-02-11 17:06:41 +08:00
|
|
|
<section id='instructions'>
|
|
|
|
Camper Cat 的忍者训练页面进展顺利。请将他在页面底部呈现版权信息的<code>div</code>标签更改为<code>footer</code>标签。
|
|
|
|
</section>
|
2018-10-10 18:03:03 -04:00
|
|
|
|
|
|
|
## Tests
|
|
|
|
<section id='tests'>
|
|
|
|
|
|
|
|
```yml
|
|
|
|
tests:
|
2020-02-11 17:06:41 +08:00
|
|
|
- text: '你的代码中应该包含 1 个<code>footer</code>标签。'
|
|
|
|
testString: assert($('footer').length == 1);
|
|
|
|
- text: '你的代码中不应包含<code>div</code>标签。'
|
|
|
|
testString: assert($('div').length == 0);
|
|
|
|
- text: '你代码中的<code>footer</code>应该是闭合的。'
|
|
|
|
testString: assert(code.match(/<footer>\s*© 2018 Camper Cat\s*<\/footer>/g));
|
2018-10-10 18:03:03 -04:00
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
## Challenge Seed
|
|
|
|
<section id='challengeSeed'>
|
|
|
|
|
|
|
|
<div id='html-seed'>
|
|
|
|
|
|
|
|
```html
|
|
|
|
<body>
|
|
|
|
<header>
|
|
|
|
<h1>Training</h1>
|
|
|
|
<nav>
|
|
|
|
<ul>
|
|
|
|
<li><a href="#stealth">Stealth & Agility</a></li>
|
|
|
|
<li><a href="#combat">Combat</a></li>
|
|
|
|
<li><a href="#weapons">Weapons</a></li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
</header>
|
|
|
|
<main>
|
|
|
|
<section id="stealth">
|
|
|
|
<h2>Stealth & Agility Training</h2>
|
|
|
|
<article><h3>Climb foliage quickly using a minimum spanning tree approach</h3></article>
|
|
|
|
<article><h3>No training is NP-complete without parkour</h3></article>
|
|
|
|
</section>
|
|
|
|
<section id="combat">
|
|
|
|
<h2>Combat Training</h2>
|
|
|
|
<article><h3>Dispatch multiple enemies with multithreaded tactics</h3></article>
|
|
|
|
<article><h3>Goodbye world: 5 proven ways to knock out an opponent</h3></article>
|
|
|
|
</section>
|
|
|
|
<section id="weapons">
|
|
|
|
<h2>Weapons Training</h2>
|
|
|
|
<article><h3>Swords: the best tool to literally divide and conquer</h3></article>
|
|
|
|
<article><h3>Breadth-first or depth-first in multi-weapon training?</h3></article>
|
|
|
|
</section>
|
|
|
|
</main>
|
|
|
|
|
|
|
|
|
|
|
|
<div>© 2018 Camper Cat</div>
|
|
|
|
|
|
|
|
|
|
|
|
</body>
|
|
|
|
```
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
## Solution
|
|
|
|
<section id='solution'>
|
|
|
|
|
2020-02-11 17:06:41 +08:00
|
|
|
```html
|
2018-10-10 18:03:03 -04:00
|
|
|
// solution required
|
|
|
|
```
|
2020-02-11 17:06:41 +08:00
|
|
|
|
2018-10-10 18:03:03 -04:00
|
|
|
</section>
|
2020-02-11 17:06:41 +08:00
|
|
|
|