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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
        <header id="header" class="header-container">
          <div class="img-header">
               <img id="header-img" src="https://aldhairescobar.github.io/t-rexLandingPage/img/trexheader.png" alt="T-Rex Game Image">
          </div>
          <nav id="nav-bar" class="nav-header">
               <ul class="navbar">
                    <li><a class="nav-link" href="#header">Home</a></li>
                    <li><a class="nav-link" href="#section-video">Popularity</a></li>
                    <li><a class="nav-link" href="#section-play">Play</a></li>
                    <li><a class="nav-link" href="#footer">Contact</a></li>
               </ul>
          </nav>
          <section class="text-header">
                    <h1 class="header-title">Chrome Dino Run</h1>
                    <p class="section-text">Feeling like a Neanderthal when your Internet signal dies?</p><p class="section-text">Google understands your pains and offers a cool entertainment to fill in time while your connection to the World Wide Web is trying to come back to life: Chrome dinosaur offline game! </p>
                    <a class="nav-link link-button link-text" href="#section-play">Play Game</a>
          </section>
        </header>
          <main>
               <section class="section section-black">
                         <h2 class="section-header">How was the game invented?</h2>
                         <p class="section-text"> Chrome dinosaur offline game got the nickname “Project Bolan” in honor of Marc Bolan, the frontman of “T-Rex’, a legendary rock band of the 1970s. While designing the game, the engineers thought about allotting Dino more features like roaring and kicking but refused this idea to keep the game maximally simplistic or “prehistoric”.
                         The T-Rex game was first introduced in September 2014, but it did not work on earlier Android OS versions so that Google developers fully completed their brainchild only by December that year. </p>
               </section>
               <section id="section-play" class="section section-play">
                    <div>
                     <img  class="gif" src="https://aldhairescobar.github.io/t-rexLandingPage/img/Special-Edition.gif" alt="T-Rex Running Image">
                    </div>
                    <div class="section-play-text">
                    <h2 class="section-header">How to play Chrome Dinosaur Game?</h2>
                    <p class="section-text">
                     The game can be launched in the Chrome browser on both desktop and mobile. The control is the simplest: when you see that black dinosaur in your browser signifying that there is no Internet connection, just hit the spacebar to launch the game. The spacebar is also used to leap over obstacles. The down arrow is used to duck. If you are on mobile, just tap the little Chrome Dino to get into action and avoid obstacles, too.
                    </p>
                    </div>
               </section>
               <hr>
               <section id="section-video" class="section section-video">
                    <h2 class="section-header">Popularity</h2>
                    <p class="section-text section-text-video">As of September 2018, about 270 million games are played on a monthly basis, both on smartphones and laptops. A large percentage of users come from developing countries where mobile data is expensive and unreliable, like India, Indonesia, Mexico, and Brazil.
                    In fact, it reached a level where Google developers had to provide business admins an option to deactivate the game because employees and students really got into it.</p>
                    <div class="video">
                    <iframe id="video" width="560" height="315" src="https://www.youtube.com/embed/2HEF2_I-2KA" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
                    </div>
               </section>
          </main>
          <section class="section section-black section-contact">
               <h2 class="section-header">Let's keep in touch</h2>
               <p class="section-text">Give us your email and we'll keep you update about this amazing game!</p>
               <form id="form" action="https://www.freecodecamp.com/email-submit">
                 <label class="label" for="email">Email</label>
                 <input class="input" type="email" name="email" id="email" placeholder="Enter email here..." required>
                 <input id="submit" class="btn" type="submit" value="Send">
               </form>
          </section>
     <footer>
          <div id="footer" class="footer section-black">
               <p class="footer-text">by Aldhair Escobar</p>
               <div>
               <a href="https://github.com/aldhairescobar" target="_blank"><img class="footer-icon" src="https://aldhairescobar.github.io/t-rexLandingPage/img/github-original.svg" alt="github icon"></a>
               <a href="https://twitter.com/aldhairescobar_" target="_blank"><img class="footer-icon" src="https://aldhairescobar.github.io/t-rexLandingPage/img/twitter-original.svg" alt="twitter icon"></a>
               <a href="https://www.instagram.com/aldhaircabanas/?hl=es-la" target="_blank"><img class="footer-icon" src="https://aldhairescobar.github.io/t-rexLandingPage/img/instagram-filled.svg" alt="instagram icon"></a>
               </div>
          </div>
     </footer>
              
            
!

CSS

              
                body{
     margin: 0;
     font-family: Cambria;
     box-sizing: border-box;
}
h1, h2{
     margin: 0;
}

/* header section */

.header-container{
     display: grid;
     column-gap: 10px;
     grid-template-columns: minmax(220px, .8fr) 1fr;
     grid-template-rows: auto 1fr;
     grid-template-areas: 
     "nav-header nav-header"
     "img-header text-header"
     ;
}

.nav-header{
     grid-area: nav-header;
     display: flex;
     justify-content: flex-end;
     background-color: white;
     width: 100%;
     height: auto;
     position: fixed;
}
.nav-header .navbar{
     list-style: none;
     display: flex;
     align-items: center;
     margin: 0;
     padding: .8rem;
}
.nav-link{
     color: black;
     margin-right: 1rem;
     font-weight: bold;
     font-size: 1.3rem;
}
.nav-link:hover, .nav-link:focus{
     color: #555;
}
.link-button{
     background-color: #222;
     color: white;
     padding: .3em;
     border-radius: .3em;
     text-decoration: none;
}
.link-button:hover, .link-button:focus{
     background-color: #555;
     color: white;
}

.link-text{
     align-self: flex-start;
}
.img-header{
     grid-area: img-header;
     display: flex;
     justify-content: center;
}
.img-header img{
     width: 100%;
}
.text-header{
     grid-area: text-header;
     display: flex;
     flex-direction: column;
     justify-content: center;
     padding-right: 4rem;
}
.header-title{
     font-size: 3rem;
     margin: 0;
     padding: 0;
}
.section-text{  
     margin: 15px 0px;
     font-size: 1.2rem;
}

/*  Sections */

.section{
     margin: 0;
     padding: 2.5rem 2.2rem;
}
.section-black{
     background-color: #222;
     color: white;
}
.section-header{
     font-size: 2rem;
     margin-bottom: 3%;
}


/* How to play */

.section-play{
     display: flex;
     align-items: center;
}

.gif{
  height: 300px;
}

.section-play-text{
     display: flex;
     flex-direction: column;
     padding-left: 1.2rem;
}

hr{
     width: 5%;
     border: 0;
     border-bottom: 3px dotted black;
}

/* Section Video */


.section-video{
     display: flex;
     flex-direction: column;
     align-items: center;
}


/* Contact us */

.section-contact{
     display: flex;
     flex-direction: column;
}

.label{
     font-size: 1.2rem;
}
.input{
     font-size: inherit;
     font-family: inherit;
     outline: none;
     border: none;
     border-radius: .3em;
}
.input:focus{
     border: 1px solid white;
}
.btn{
     border: none;     
     font-size: inherit;
     font-family: inherit;
     background-color: white;
     font-weight: bold;
     background-origin: 1px solid black;
     margin-left: .3rem ;
     border-radius: .3rem;
     cursor: pointer;
     margin: 5px;
}
.btn:hover, .btn:focus{
     background-color: #444;
     color: white;
}


.video iframe{
     max-width: 100%;
     border-style: none;
}

/* footer */

.footer{
     display: flex;
     justify-content: space-between;
     align-items: center;
}

.footer-icon{
     width: 25px;
     filter: invert(100%);
     margin-right: 10px;
}
.footer-text{
     color: #666;
     margin-left: 10px;
}
.footer-icon:hover, .footer-icon:focus{
     width: 30px;

}
 @media(max-width: 850px){

     
     .header-title, .section-header{
          text-align: center;
     }
     .nav-link{
          font-size: 1.2rem;
     }

     /* header section */

     .header-container{
          height: auto;
          display: flex;
          flex-direction: column;
          ;
     }
          
     .text-header{
          padding: 2.5rem 2.2rem;
     }
     .img-header{
          grid-area: img-header;
          order: 2;
          display: flex;
          justify-content: center;
          padding: 2.5rem 2.2rem;

     }
     .img-header img{
          height: 100%;
          width: 100%;
     }

     /* How to play */

     .section-play{
          flex-direction: column;
          align-items: center;
     }
     .gif{
          height: 100%;
          width: 100%;
        }
     .section-play-text{
          padding-left: 0;
     }

     /* button */

     .btn{
          margin: 5px 0px;
     }

} 

@media(max-width: 600px){
.nav-header{
     grid-area: nav-header;
     display: flex;
     justify-content: space-around;
}
.nav-header .navbar{
     list-style: none;
     display: flex;
     align-items: center;
     margin: 0;
     padding: .5rem;
}
}
              
            
!

JS

              
                
              
            
!
999px

Console