HTML preprocessors can make writing HTML more powerful or convenient. For instance, Markdown is designed to be easier to write and read for text documents and you could write a loop in Pug.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. So you don't have access to higher-up elements like the <html>
tag. If you want to add classes there that can affect the whole document, this is the place to do it.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. If you need things in the <head>
of the document, put that code here.
The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https.
CSS preprocessors help make authoring CSS easier. All of them offer things like variables and mixins to provide convenient abstractions.
It's a common practice to apply CSS to a page that styles elements such that they are consistent across all browsers. We offer two of the most popular choices: normalize.css and a reset. Or, choose Neither and nothing will be applied.
To get the best cross-browser support, it is a common practice to apply vendor prefixes to CSS properties and values that require them to work. For instance -webkit-
or -moz-
.
We offer two popular choices: Autoprefixer (which processes your CSS server-side) and -prefix-free (which applies prefixes via a script, client-side).
Any URLs added here will be added as <link>
s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.
You can apply CSS to your Pen from any stylesheet on the web. Just put a URL to it here and we'll apply it, in the order you have them, before the CSS in the Pen itself.
You can also link to another Pen here (use the .css
URL Extension) and we'll pull the CSS from that Pen and include it. If it's using a matching preprocessor, use the appropriate URL Extension and we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
JavaScript preprocessors can help make authoring JavaScript easier and more convenient.
Babel includes JSX processing.
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.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
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.
Using packages here is powered by esm.sh, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ESM usage.
All packages are different, so refer to their docs for how they work.
If you're using React / ReactDOM, make sure to turn on Babel for the JSX processing.
If active, Pens will autosave every 30 seconds after being saved once.
If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.
If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.
Visit your global Editor Settings.
<div id="top"></div>
<!-- Header and Menu -->
<header id="header" class="sticky-top bg-dark">
<img id="header-img" class="img-fluid" src="https://raw.githubusercontent.com/danijmoss/images/master/product-landing-pg/logo.png" alt="Dynasty Warriors 8 Logo">
<nav id="nav-bar" class="nav justify-content-center">
<a class="nav-link text-white" href="#intro">Trailer</a>
<a class="nav-link text-white" href="#featured">Features</a>
<a class="nav-link text-white" href="#reviews">Reviews</a>
<a class="nav-link text-white" href="#mailing-list">Updates</a>
</nav>
</header>
<!-- END Header and Menu -->
<!-- Main Content -->
<main role="main">
<!-- Jumbotron -->
<section id="intro" class="jumbotron">
<div class="container">
<div class="row">
<div class="col-md-12">
<h1 class="display-1 text-center pt-5">Relive history</h1>
<h2 class="display-3 text-center pb-5">07.16.2013</h2>
</div>
<div class="col-md-6 col-sm-12">
<img src="https://raw.githubusercontent.com/danijmoss/images/master/product-landing-pg/dw8-logo.png" alt="Dynasty Warriors 8" class="img-fluid mx-auto d-block">
</div>
<div class="col-md-6 col-sm-12">
<div class="embed-responsive embed-responsive-16by9">
<iframe id="video" class="embed-responsive-item" width="712" height="415" src="https://www.youtube.com/embed/Xrkex_oLhAk?rel=0&controls=0&showinfo=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
</div>
</div>
</div>
</section>
<!-- END Jumbotron -->
<!-- Available Platforms -->
<section id="available" class="available pb-5">
<div class="col-md-12">
<p class="display-4 text-white text-center">Available On</p>
<img class="img-fluid mx-auto d-block" src="https://raw.githubusercontent.com/danijmoss/images/master/product-landing-pg/available-on.png" alt="Available on PlayStation3, PlayStation Network, XBOX 360, and XBOX Live">
</div>
</section>
<!-- END Available Platforms -->
<!-- Parallax Image 01 -->
<div class="parallax01"></div>
<!-- Game Features -->
<section id="featured" class="container p-5">
<div class="row">
<div class="col-md-12">
<h2 class="display-3 text-white py-5">Features</h2>
</div>
<div class="col-md-4">
<img class="rounded mx-auto d-block img-fluid" src="https://raw.githubusercontent.com/danijmoss/images/master/product-landing-pg/dw8-characters.jpg" alt="Image of a cutscene featuring the characters Zhou Yu and Sun Shangxiang.">
<p class="lead text-center text-white py-3">Choose from over 83 playable characters.</p>
</div>
<div class="col-md-4">
<img class="rounded mx-auto d-block img-fluid" src="https://raw.githubusercontent.com/danijmoss/images/master/product-landing-pg/dw8-3pointsystem.png" alt="An image describing the new Three Point Weapon System, where Heaven has an Advantage over Earth, Earth has an advantage over Man, and Man has an Advantage over Heaven.">
<p class="lead text-center text-white py-3">Use the Three Point System to unleash powerful attacks.</p>
</div>
<div class="col-md-4">
<img class="rounded mx-auto d-block img-fluid" src="https://raw.githubusercontent.com/danijmoss/images/master/product-landing-pg/dw8-ambition-min.jpg" alt="An image of the character Zhang Liao fighting a group of enemies.">
<p class="lead text-center text-white py-3">Play as a young officer in Ambition Mode and work towards constructing the great Tongquetai Palace for the Emperor.</p>
</div>
</div>
</section>
<!-- Parallax Image 02 -->
<div class="parallax02"></div>
<!-- Game Reviews Slider -->
<section id="reviews" class="container p-5">
<div class="row">
<div class="col-md-12">
<h2 class="display-3 text-white py-5">Reviews</h2>
</div>
</div>
<div class="col-md-12 col-sm-12">
<div id="reviewCarousel" class="carousel slide" data-ride="carousel">
<div class="carousel-inner">
<div class="carousel-item active">
<blockquote class="blockquote">
<p class="mb-0 text-white"><small>Dynasty Warriors 8 adds in new features and options to the long-running franchise to breathe new life into the game. Fans, get ready for the best experience in the series since DW3. An instant buy for any KOEI fanatic.</small></p>
<br>
<footer class="blockquote-footer"><cite class="text-white" title="Playstation Universe">Playstation Universe</cite></footer>
</blockquote>
</div>
<div class="carousel-item">
<blockquote class="blockquote">
<p class="mb-0 text-white"><small>Dynasty Warriors 8 is the most satisfying and complete Warriors game yet, dethroning the excellent Warriors Orochi 3. It’s at once familiar and fresh, instantly recognisable at its core yet subtly transformed by intelligent additions and a series of small but noticeable tweaks.</small></p>
<br>
<footer class="blockquote-footer"><cite class="text-white" title="IGN">IGN</cite></footer>
</blockquote>
</div>
<div class="carousel-item">
<blockquote class="blockquote">
<p class="mb-0 text-white"><small>Against all odds, KOEI has proven that even the smallest of adjustments are still enough to maintain interest in its hack and slash series. Hardcore fans and completionists will have an absolute field day with plenty of enjoyment to be had by non-regulars and newcomers alike.</small></p>
<br>
<footer class="blockquote-footer"><cite class="text-white" title="TheSixthAxis">TheSixthAxis</cite></footer>
</blockquote>
</div>
</div>
</div>
</div>
</section>
<!-- END Game Reviews Slider -->
<!-- Parallax Image 03 -->
<div class="parallax03"></div>
<!-- Mailing List -->
<section id="mailing-list" class="container p-5">
<div class="row">
<div class="col-md-12 col-sm-12">
<h2 class="display-3 text-white py-5">Stay Updated</h2>
<p class="lead text-white">Sign up for our mailing list to stay up to date on release information and upcoming DLC.</p>
<form id="form" action="https://www.freecodecamp.com/email-submit">
<div class="input-group mb-3">
<input id="email" type="email" name="email" class="form-control" placeholder="example.email.com" aria-label="Email mailing list input" aria-describedby="submit" pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$" size="35" required>
<div class="input-group-append">
<input id="submit" type="submit" class="btn btn-outline-light">
</div>
</div>
</form>
</div>
</div>
</section>
<!-- END Mailing List -->
</main>
<!-- END Main Content -->
<!-- Footer -->
<footer id="footer" class="footer bg-black text-justify p-4">
<div class="container">
<hr>
<div class="row">
<p class="lead text-white">
<small>This site was made for educational purposes. All trademarks and copyright are owned by their respective holders. <br><br>
DYNASTY WARRIORS and the KOEI logo are registered trademarks of TECMO KOEI GAMES CO.,LTG. The KT logo is a registered trademark of TECMO KOEI HOLDINGS CO.LTD. <br><br>
©2013 TECMO KOEI GAMES CO. LTD. All rights reserved. "Playstation". the "PS" Family logo and "PS3" are registered trademarks and the PlayStation Network logo is a trademark of Sony Computer Entertainment Inc. Kinect, Xbox, Xbox 360, Xbox LIVE, and the Xbox logos are trademarks of the Microsoft group of companies and are used under license from Microsoft.
<br><br>
The ESRB ratings icon is a registered trademark of the Entertainment Software Association. All other trademarks and copyrights are property of their respective owners.
<br><br>
</small>
</p>
<p class="lead">
<strong>
Project completed for <a href="https://learn.freecodecamp.org/responsive-web-design/responsive-web-design-projects/build-a-product-landing-page" target="_blank">FreeCodeCamp Product Landing Page project</a>.
<br>
Reviews sourced from <a href="http://www.metacritic.com/game/playstation-3/dynasty-warriors-8ff" target="_blank">Metacritic</a>.
<br>
Dynasty Warriors 8 information sourced from the <a href="http://www.koeitecmoamerica.com/dw8/#home" target="_blank">Official Dynasty Warriors 8 website</a>.
</strong>
</p>
</div>
</div>
</footer>
<!-- END Footer -->
body {
background-color: #000;
}
#header {
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
box-shadow: 0px 3px 10px 3px rgba(255, 255, 255, 0.2);
}
#header-img {
padding: 10px;
order: 0;
}
#nav-bar > .nav-link {
display: inline-flex;
order: 1;
}
.bg-dark {
background-color: #000! important;
}
.jumbotron {
background: linear-gradient(180deg, transparent, black),
url("https://raw.githubusercontent.com/danijmoss/images/master/product-landing-pg/full-bloom.png");
border-radius: 0;
}
.available {
background: #000;
}
.parallax01 {
background-image: url("https://raw.githubusercontent.com/danijmoss/images/master/product-landing-pg/zhao-yun-wallpaper.png");
height: 500px;
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
.parallax02 {
background-image: url("https://raw.githubusercontent.com/danijmoss/images/master/product-landing-pg/zuo-ci.jpg");
height: 400px;
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
.parallax03 {
background-image: url("https://raw.githubusercontent.com/danijmoss/images/master/product-landing-pg/sun-shangxiang02.jpg");
height: 600px;
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
.footer {
background: linear-gradient(180deg, black, transparent),
url("https://raw.githubusercontent.com/danijmoss/images/master/product-landing-pg/full-bloom.png");
border-radius: 0;
}
@media all and (max-width: 400px) {
#nav-bar > .nav-link {
flex-direction: column;
}
}
@media all and (max-width: 600px) {
#header {
justify-content: space-around;
}
}
Also see: Tab Triggers