freeCodeCamp/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-css-grid-by-building-.../6143b97c06c3306d23d5da47.md

6.5 KiB

id title challengeType dashedName
6143b97c06c3306d23d5da47 步驟 19 0 step-19

--description--

在你的 article 元素中,創建一個 h3 元素,其 classlist-title,文本爲 A Brief History。 在此之下,創建一個 p 元素,文本爲 Of the Curriculum。 然後創建一個 class 爲 listsul 元素。

--hints--

你應該在 article 元素中創建一個 h3 元素。

assert.exists(document.querySelector('article h3'));

你應該在 article 元素中創建一個 p 元素。

assert.exists(document.querySelector('article p'));

你應該在 article 元素中創建一個 ul 元素。

assert.exists(document.querySelector('article ul'));

article 元素中的元素應按正確的順序排列。

const children = document.querySelector('article')?.children;
assert(children?.[0]?.localName === 'h3');
assert(children?.[1]?.localName === 'p');
assert(children?.[2]?.localName === 'ul');

你的新 h3 元素應有 class 值爲 list-title

assert(document.querySelector('article h3')?.className === 'list-title');

你的新 h3 元素應包含文本 A Brief History

assert(document.querySelector('article h3')?.innerText === 'A Brief History');

你的新 p 元素應包含文本 Of the Curriculum

assert(document.querySelector('article p')?.innerText === 'Of the Curriculum');

你的新 ul 元素應有 class 值爲 lists

assert(document.querySelector('article ul')?.className === 'lists');

--seed--

--seed-contents--

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Magazine</title>
    <link
      href="https://fonts.googleapis.com/css?family=Anton%7CBaskervville%7CRaleway&display=swap"
      rel="stylesheet"
    />
    <link
      rel="stylesheet"
      href="https://use.fontawesome.com/releases/v5.8.2/css/all.css"
    />
    <link rel="stylesheet" href="styles.css" />
  </head>
  <body>
    <main>
      <section class="heading">
        <header class="hero">
          <img
            src="https://cdn.freecodecamp.org/platform/universal/fcc_meta_1920X1080-indigo.png"
            alt="freecodecamp logo"
            loading="lazy"
            class="hero-img"
            width="400"
          />
          <h1 class="hero-title">OUR NEW CURRICULUM</h1>
          <p class="hero-subtitle">
            Our efforts to restructure our curriculum with a more project-based
            focus
          </p>
        </header>
        <div class="author">
          <p class="author-name">
            By
            <a href="https://freecodecamp.org" target="_blank" rel="noreferrer"
              >freeCodeCamp</a
            >
          </p>
          <p class="publish-date">March 7, 2019</p>
        </div>
        <div class="social-icons">
          <a href="https://www.facebook.com/freecodecamp/">
            <i class="fab fa-facebook-f"></i>
          </a>
          <a href="https://twitter.com/freecodecamp/">
            <i class="fab fa-twitter"></i>
          </a>
          <a href="https://instagram.com/freecodecamp">
            <i class="fab fa-instagram"></i>
          </a>
          <a href="https://www.linkedin.com/school/free-code-camp/">
            <i class="fab fa-linkedin-in"></i>
          </a>
          <a href="https://www.youtube.com/freecodecamp">
            <i class="fab fa-youtube"></i>
          </a>
        </div>
      </section>
      <section class="text">
        <p class="first-paragraph">
          Soon the freeCodeCamp curriculum will be 100% project-driven learning. Instead of a series of coding challenges, you'll learn through building projects - step by step. Before we get into the details, let me emphasize: we are not changing the certifications. All 6 certifications will still have the same 5 required projects. We are only changing the optional coding challenges.
        </p>
        <p>
          After years - years - of pondering these two problems and how to solve them, I slipped, hit my head on the sink, and when I came to I had a revelation! A vision! A picture in my head! A picture of this! This is what makes time travel possible: the flux capacitor!
        </p>
        <p>
          It wasn't as dramatic as Doc's revelation in Back to the Future. It
          just occurred to me while I was going for a run. The revelation: the entire curriculum should be a series of projects. Instead of individual coding challenges, we'll just have projects, each with their own seamless series of tests. Each test gives you just enough information to figure out how to get it to pass. (And you can view hints if that isn't enough.)
        </p>
        <blockquote>
          <hr />
          <p class="quote">
            The entire curriculum should be a series of projects
          </p>
          <hr />
        </blockquote>
        <p>
          No more walls of explanatory text. No more walls of tests. Just one
          test at a time, as you build up a working project. Over the course of passing thousands of tests, you build up projects and your own understanding of coding fundamentals. There is no transition between lessons and projects, because the lessons themselves are baked into projects. And there's plenty of repetition to help you retain everything because - hey - building projects in real life has plenty of repetition.
        </p>
        <p>
          The main design challenge is taking what is currently paragraphs of explanation and instructions and packing them into a single test description text. Each project will involve dozens of tests like this. People will be coding the entire time, rather than switching back and forth from "reading mode" to "coding mode".
        </p>
        <p>
          Instead of a series of coding challenges, people will be in their code editor passing one test after another, quickly building up a project. People will get into a real flow state, similar to what they experience when they build the required projects at the end of each certification. They'll get that sense of forward progress right from the beginning. And freeCodeCamp will be a much smoother experience.
        </p>
      </section>
      <section class="text text-with-images">
--fcc-editable-region--
        <article class="brief-history">

        </article>
--fcc-editable-region--
        <aside class="image-wrapper"></aside>
      </section>
    </main>
  </body>
</html>