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 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.
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.
If the stylesheet 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 CSS 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.
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 Skypack, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ES6 import
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 class="parallax-container" id="main">
<div class="section no-pad-bot">
<div class="container">
<br><br>
<h1 class="header center quote" id="title">AYRTON SENNA</h1>
<div class="row center">
<h5 class="header col s12 white-text quote">"Being second is to be the first of the ones who lose."</h5>
</div>
<br><br>
</div>
</div>
<div class="parallax" id="img-div"><img src="https://www.realistik-it.com/lotus.jpg" alt="Ayrton Senna">
<img src="" alt="hidden-image" id="image">
<p id="img-caption">bla bla bla</p>
</div>
</div>
<div class="container">
<div class="section">
<div class="row">
<div class="col s12 center">
<h3><i class="mdi-content-send brown-text"></i></h3>
<h4>ABOUT</h4>
<p class="left-align light">It was clear from the beginning that Senna was meant to be a race car driver and his father saw this potential and made him a go-kart after which he participated and won countless go-kart racing competitions and eventually contested in the World Karting Championship for three consecutive years.</p>
<p class="left-align light">This is the time when his talent was noticed and he moved on to single seater racing. But his break in F1 came in 1984 where he raced for new comers Toleman. He was a racer who was all for traction control only because it'd have increased speed!</p>
<p class="left-align light">Senna was ruthless on the track and his pursuit for winning led him to do a lot of crazy things on the track like crashing into team-mate Alain Prost. But his appreciation for the race craft, his ability to find traction in on a wet track and his immense self-control when stress was at the maximum, made him a completely different breed of driver.</p>
<span><a id="tribute-link" href="https://en.wikipedia.org/wiki/Ayrton_Senna" target="_blank">Read more on Wikipedia</a></span>
</div>
</div>
</div>
</div>
<div class="parallax-container valign-wrapper">
<div class="section no-pad-bot">
<div class="container">
<div class="row center">
<h5 class="header col s12 light white-text quote">"You will never know the feeling of a driver when winning a race. The helmet hides feelings that cannot be understood."</h5>
</div>
</div>
</div>
<div class="parallax"><img src="https://www.realistik-it.com/helmet.jpg" alt="Unsplashed background img 2"></div>
</div>
<div class="container">
<div class="section">
<div class="row">
<div class="col s12 m6" id="tribute-info">
<div class="icon-block">
<h2 class="center brown-text"><i class="material-icons">flash_on</i></h2>
<h5 class="center">F1 Results</h5>
<ul class="center">
<li>3 Time Formula 1 World Champion</li>
<li>161 Grand Prix participations</li>
<li>32,982 Laps leading the race</li>
<li>610 Scored points</li>
<li>41 Victories</li>
<li>65 Pole positions</li>
</ul>
</div>
</div>
<div class="col s12 m6">
<div class="icon-block">
<h2 class="center brown-text"><i class="material-icons">settings</i></h2>
<h5 class="center">Teams</h5>
<ul class="center">
<li>1984 - Toleman</li>
<li>1985-1987 - Team Lotus</li>
<li>1988-1993 - McLaren</li>
<li>1994 - Williams</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="parallax-container valign-wrapper">
<div class="section no-pad-bot">
<div class="container">
<div class="row center">
<h5 class="header col s12 light white-text quote">"Racing, competing, is in my blood. It's part of me, it's part of my life; I've been doing it all my life. And it stands up before anything else."</h5>
</div>
</div>
</div>
<div class="parallax"><img src="https://www.realistik-it.com/senna.jpg" alt="Unsplashed background img 3"></div>
</div>
<footer class="page-footer black">
<div class="footer-copyright">
<div class="container">
Created with <i class="material-icons text-red">favorite</i> by <a class="brown-text text-lighten-3" href="#">sorinr</a>
</div>
</div>
</footer>
.page-footer{
margin-top: 0px !important;
}
.container h1 {
font-size: 3em;
font-weight: 700;
margin-top: 80px;
padding: 16px;
color: #fff;
}
.quote{
text-shadow: 2px 2px 4px #000;
}
footer{
text-align: center;
}
/* Some hacks to comply with the test unit */
#image {
display: block;
margin: 0 auto;
max-width: 100%;
opacity: 0;
}
#img-caption {
display: none;
}
$(document).ready(function() {
$('.parallax').parallax();
});
Also see: Tab Triggers