Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <a href="#main" class="skip-main">Skip to main content</a>
<header id="header">
  <figure>
    <a href="#intro-video-section" class="logo">
      <img id="header-img" src="https://www.nvaccess.org/images/logo.png" alt="NV Access logo">
    </a>
  </figure>
  <input type="checkbox" id="nav-toggle" class="nav-toggle">
  <nav id="nav-bar">
    <ul>
      <li><a class="nav-link " href="#features-section">features</a></li>
      <li><a class="nav-link " href="#get-involved-section">how to get involved</a></li>
      <li><a class="nav-link " href="#newsletter-section">join our newsletter</a></li>
    </ul>
  </nav>
  <label for="nav-toggle" class="hamburger-menu"><i class="fas fa-bars hamburger"></i></label>
</header>

<main id="main">
  <section id="intro-video-section" class="intro-video">
    <h1>NVDA: The free software empowering blind people world wide</h1>
    <iframe id="video" src="https://www.youtube.com/embed/Ks7AwV_uxO0 " frameborder="0 " allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture " allowfullscreen></iframe>
  </section>
  <section id="features-section" class="features">
    <h2>features</h2>
    <section class="affordable-feature feature">
      <section class="icon"><i class="far fa-money-bill-alt "></i></section>
      <section class="description">
        <h3>AFFORDABLE</h3>
        <p>100% free to use globally, so you never have to worry about how you are going to afford screen reading software again!
        </p>
      </section>
    </section>
    <!--affordable-->
    <section class="fast-feature feature ">
      <section class="icon"> <i class="fas fa-bolt "></i>
      </section>
      <section class="description">
        <h3>FAST</h3>
        <p>Fast, light-weight and small footprint ensures superior stability, reliability and less crashes, so you are more productive!
        </p>
      </section>
    </section>
    <!--fast-->
    <section class="functional-feature feature ">
      <section class="icon"> <i class="fas fa-cog "></i>
      </section>
      <section class="description">
        <h3>FUNCTIONAL</h3>
        <p>Just as powerful and functional as the paid screen reader alternatives, so you will never have to sacrifice on quality!
        </p>
      </section>
    </section>
    <!--functional-->
  </section>
  <!--features-->
  <section id="get-involved-section" class="get-involved">
    <h2>how to get involved</h2>
    <section class="download-card card ">
      <p><a href="#">Download the <span>NVDA</span> Screen Reader</a></p>
    </section>
    <section class="support-card card ">
      <p><a href="#"><span>Support</span>NV Access</a></p>
    </section>
    <section class="training-card card ">
      <p><a href="#"><span>TRAINING</span> & Support Materials</a></p>
    </section>
  </section>
  <!--get-involved-->
  <section id="newsletter-section" class="newsletter">
    <form id="form" action="https://www.freecodecamp.com/email-submit">
      <label for="email"><h2>JOIN OUR NEWSLETTER!</h2></label>
      <input name="email" id="email" type="email" placeholder="Enter your email address" required/>
      <input id="submit" type="submit" value="Subscribe" class="btn"></input>
    </form>
  </section>
</main>
<footer>
  <p>Reference: <a href="https://nvaccess.org" class="a_footer">https://nvaccess.org</a></p>
  <p>Created by Ming Yong for freeCodeCamp Responsive Web Design Certification.</p>
</footer>
              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css?family=Barlow|Delius");
:root {
  --clr-primary: #fff;
  --clr-secondary: #333;
  --clr-lb: #30cdd2;
  --clr-db: #13105d;
  --clr-o: #ff861e;
  --ff: "Barlow", sans-serif;
  --ff-card: "Delius", cursive;
  --fs-xm: 1rem;
  --fs-sm: calc(var(--fs-xm) + 0.5rem);
  --fs-m: calc(var(--fs-xm) + 0.75rem);
  --fs-b: calc(var(--fs-xm) + 1rem);
  --space-sm: 1rem;
  --space-m: calc(var(--space-sm) + 1rem);
  --video-height: 315px;
  --video-width: calc(var(--video-height) * 1.77);
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  max-width: 100vw;
  font-family: var(--ff);
}

/* spacing */

h1,
h2,
h3,
p,
.card {
  margin-bottom: var(--space-sm);
}

.intro-video,
.features,
.get-involved,
.newsletter {
  margin-bottom: var(--space-m);
}

/* font size */

h1 {
  font-size: var(--fs-b);
  text-transform: uppercase;
}

h2 {
  font-size: var(--fs-m);
  text-transform: uppercase;
}

h3 {
  font-size: var(--fs-sm);
  text-transform: uppercase;
}

p,
a {
  font-size: var(--fs-xm);
}

/* skip main */

a.skip-main {
  text-decoration: none;
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  top: auto;
  overflow: hidden;
  z-index: -999;
}

a.skip-main:hover,
a.skip-main:focus {
  color: var(--clr-primary);
  background-color: var(--clr-secondary);
  left: 0;
  top: 25%;
  width: auto;
  height: auto;
  overflow: auto;
  padding: 5px;
  text-align: center;
  z-index: 9999;
}

a.skip-main:active {
  background-color: var(--clr-primary);
  color: var(--clr-secondary);
  border: lpx solid var(--clr-secondary);
}

/* header */

header {
  background-color: var(--clr-primary);
  position: fixed;
  top: 0;
  text-align: center;
  width: 100%;
  z-index: 999;
}

header img {
  max-height: 5rem;
}

nav {
  background-color: var(--clr-primary);
  /* locate under the banner */
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  text-align: left;
  /* animation when close(.nav-toggle unchecked) */
  transform: scale(1, 0);
  transform-origin: top;
  transition: transform 400ms ease-in-out;
}

nav ul {
  margin-left: 1rem;
  list-style: none;
}

nav a {
  color: var(--clr-secondary);
  text-decoration: none;
  text-transform: uppercase;
  display: block;
  padding: 1rem;
  /* animation when close(.nav-toggle unchecked) */
  opacity: 0;
  transition: opacity 150ms ease-in-out;
}

nav a:hover,
nav a:focus {
  color: var(--clr-secondary);
  background-color: var(--clr-primary);
}

/* hamburger menu */

.nav-toggle {
  display: none;
}

.hamburger-menu {
  position: absolute;
  top: 0;
  right: 0;
  margin-left: 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  cursor:pointer;
}

.hamburger {
  padding: 1rem;
}

.hamburger:hover,
.hamburger:focus {
  border: 1px solid var(--clr-secondary);
}

.nav-toggle:checked ~ nav {
  /* ~ looks for preceeding sibling */
  transform: scale(1, 1);
}

.nav-toggle:checked ~ nav a {
  opacity: 1;
  /* animation when open(.nav-toggle checked) */
  transition: opacity 250ms ease-in-out 250ms;
}

/* main */

main {
  margin-top: 6rem;
  display: grid;
  grid-template-columns: 2fr 12fr 2fr;
}

main section {
  grid-column: 2/3;
}

.intro-video,
.features,
.feature,
.get-involved {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.feature {
  text-align: center;
}

.feature .icon {
  font-size: var(--fs-b);
}

.card {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 60%;
  min-height: 300px;
  padding: 1rem 3rem;
  text-align: center;
  font-family: var(--ff-card);
}

.card p a {
  font-size: var(--fs-sm);
  text-decoration: none;
  color: var(--clr-secondary);
}

.card p span {
  font-size: var(--fs-b);
  text-transform: uppercase;
  display: block;
}

.download-card {
  background-color: var(--clr-db);
}

.download-card p a {
  color: var(--clr-primary);
}

.support-card {
  background-color: var(--clr-o);
}

.training-card {
  background-color: var(--clr-lb);
}

.newsletter form {
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.newsletter label,
.newsletter input,
.newsletter button {
  display: block;
  margin: 0.5rem;
}

.newsletter label {
  width: 100%;
}

.newsletter input,
.newsletter button {
  width: 80%;
}

.newsletter input {
  height: 1.25rem;
}

.newsletter .btn {
  color: var(--clr-primary);
  background-color: var(--clr-secondary);
  height: 2rem;
  border:none;
  border-radius: 10px;
}

/* footer */

footer {
  background-color: var(--clr-secondary);
  color: var(--clr-primary);
  display: flex;
  flex-direction:column;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.a_footer{
  color: var(--clr-primary);
}

/* responsive */

@media screen and (min-width: 920px) {
  /* header*/
  .hamburger-menu {
    display: none;
  }
  header {
    display: grid;
    grid-template-columns: 1fr 3fr 7fr 1fr;
  }
  header figure {
    grid-column: 2/3;
  }
  nav {
    all: unset;
    grid-column: 3/4;
    display: flex;
    justify-content: flex-end;
    align-items: center;
  }
  nav ul {
    display: flex;
    justify-content: flex-end;
  }
  nav a {
    opacity: 1;
    background-color: var(--clr-primary);
    color: var(--clr-secondary);
    position: relative;
  }
  nav a::before {
    content: "";
    display: block;
    height: 5px;
    background-color: var(--clr-secondary);
    position: absolute;
    top: -0.1em;
    left: 1em;
    right: 1em;
    transform: scale(0, 1);
    transition: transform ease-in-out 250ms;
  }
  nav a:hover::before {
    transform: scale(1, 1);
  }
  nav a:focus {
    background-color: var(--clr-primary);
    border: 1px solid var(--clr-secondary);
  }
  nav a:active {
    background-color: var(--clr-o);
  }
  h1 {
    text-align: center;
  }

  iframe {
    height: var(--video-height);
    width: var(--video-width);
  }
  .feature {
    display: grid;
    grid-template-columns: 1fr 7fr;
    width: 100%;
  }
  .icon {
    grid-area: 1/1/3/2;
  }
  .description {
    grid-area: 1/2/3/3;
    text-align: left;
  }
  .get-involved {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .get-involved h2 {
    width: 100%;
    text-align: center;
  }
  .card {
    width: calc(100% / 3);
  }
  .newsletter form input {
    width: 60%;
  }
  .newsletter .btn {
    width: 20%;
  }
}

              
            
!

JS

              
                // fcc test runner: https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js

//Reference: https://nvaccess.org
              
            
!
999px

Console