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.
<section class="section__panel brand__panel bg__light_grey">
<svg preserveAspectRatio="xMidYMid slice" style="width: 100%; height: 100%;" id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 947.0663 631.0554">
<defs>
<style>.cls-1{fill:none;}.cls-2{clip-path:url(#clip-path);}</style>
<clipPath id="clip-path" transform="translate(0 0)">
<path class="cls-13" d="M556.315,188.3882V101.0964c-16.6286,7.0314-32.5218,17.997-47.5549,33.5646l1.1134-33.5646H436.0157l1.1149,33.61c-15.0465-15.5926-30.9552-26.5719-47.6006-33.61v87.2918q26.8553,9.439,49.9329,41.3135.5965,61.3619-1.3594,122.7161L436.7086,429.43c-5.353-1.839-26.5938-7.368-37.666,15.9588v1.6275c21.4458,14.5424,45.0453,42.8507,73.858,82.525v.1206l.044-.06.044.06v-.1206c28.8127-39.6743,52.4123-67.9826,73.858-82.525v-1.6275c-11.072-23.3267-32.3126-17.7978-37.6659-15.9588l-1.395-77.0125q-1.9673-61.3715-1.3587-122.7774Q529.4879,197.8291,556.315,188.3882Z"/>
</clipPath>
</defs>
<g class="cls-2">
<image width="980" height="653" preserveAspectRatio="xMidYMid slice" style="position:fixed; top:0; left:0; height:100%; width:100%" transform="translate(0 0) scale(0.9664)" xlink:href="https://www.denofgeek.com/wp-content/uploads/2016/05/gb_main.jpg?resize=620%2C370"/>
</g>
</svg>
</section>
<header class="header__wrapper bg__green">
<div class="menu__button white">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 35.3404 44.372">
<rect class="right__bar" x="28.0846" width="7.2558" height="44.372"/>
<rect class="middle__bar" x="14.1006" width="7.2558" height="44.372"/>
<rect class="left__bar" width="7.2558" height="44.372" />
</svg>
</div>
</header>
<section class="section__panel bg__green">
<div class="grid__panel padded__panel__extra">
<div class="column__narrow__center type__center type__uppercase type__spaced">
<p>Rhoncus ad potenti elementum praesent a neque iaculis non vestibulum hac ipsum aptent suspendisse ullamcorper suscipit purus ut adipiscing a a a cum ante ultrices. Nibh phasellus et vel nec dictumst metus magnis suspendisse consectetur odio pharetra mattis est eleifend scelerisque luctus. Ipsum ultricies leo netus in sed ullamcorper urna et iaculis ad suspendisse sem elementum non commodo facilisis sem habitant scelerisque augue sem at. Elementum gravida elementum egestas vitae amet pharetra urna vel accumsan purus nulla venenatis dictum maecenas adipiscing. Suspendisse placerat a ligula massa leo consectetur maecenas sodales a egestas adipiscing inceptos at a suspendisse bibendum nisl non porta curabitur phasellus non scelerisque consequat lectus scelerisque dapibus luctus.</p>
<p>Rutrum sem tellus aptent ad pretium phasellus vestibulum feugiat commodo netus est parturient cum ut tristique turpis posuere et rutrum dapibus nam ultrices habitasse. Consectetur vestibulum dictumst feugiat vivamus natoque egestas vestibulum orci quis parturient nam conubia mi a quis tortor nisi vestibulum parturient at parturient porta sed scelerisque mus parturient gravida mollis. Fames vivamus a eleifend adipiscing vehicula tempus adipiscing fames posuere curae enim condimentum adipiscing a a nam vestibulum a in dui.</p>
<p>Suspendisse porta risus consequat egestas tempor et eu id augue parturient condimentum nascetur proin turpis id arcu felis a eu adipiscing a id diam consectetur et nam odio cursus. Vulputate senectus congue laoreet parturient phasellus sem a eu ac a placerat viverra dolor venenatis. Suspendisse parturient euismod nec a at vestibulum adipiscing nibh dictumst morbi penatibus in consectetur mi parturient nec senectus hac adipiscing placerat turpis parturient adipiscing. Per velit ullamcorper scelerisque nisl a vestibulum lobortis cursus cubilia est hac a a metus ullamcorper cum a parturient potenti.</p>
<p>Quis condimentum id facilisis cubilia habitasse parturient in consectetur nisi ultrices quam pulvinar habitasse vivamus dapibus mattis ullamcorper. Parturient ultricies a odio a eros parturient et nisl condimentum habitant vestibulum a a tristique a fames varius mus dapibus molestie a vestibulum parturient ad scelerisque conubia. Ullamcorper ligula class ante scelerisque dolor condimentum varius justo parturient non malesuada vestibulum leo at dapibus vitae suspendisse a parturient phasellus per suspendisse vivamus blandit dis justo ac.</p>
<p>Lacus vestibulum non orci orci parturient feugiat suspendisse a a adipiscing adipiscing nostra curae cras parturient sem integer mi euismod. Vehicula id aptent parturient torquent class nec tincidunt est nunc adipiscing dictumst a lacus dis parturient sem fringilla amet netus faucibus id scelerisque class in phasellus parturient nibh. Natoque dapibus tempus a vestibulum gravida cubilia scelerisque tellus ullamcorper vestibulum dapibus suspendisse mi nam cras condimentum varius morbi a adipiscing neque commodo turpis cubilia vestibulum morbi. Volutpat leo risus augue ullamcorper faucibus id euismod a varius metus vulputate morbi tristique mollis cubilia ullamcorper ut est a parturient proin at.</p>
</div>
</div>
</section>
body {
margin: 0;
}
.brand__panel {
width: 100%;
height: calc(100vh - 90px);
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
position: relative;
overflow: hidden;
background-color: #f0f0f0;
}
.brand__panel .brand__logotype {
position: relative;
z-index: 2;
}
.brand__panel .brand__svg {
width: auto;
height: 100%;
}
.brand__panel .brand__animation {
width: 100%;
height: 75vh;
position: fixed;
top: 0;
left: 0;
z-index: 2;
}
.brand__panel .brand__hold {
width: 100%;
height: 75vh;
position: fixed;
top: 0;
left: 0;
z-index: 1;
text-align: center;
background-image: url(../img/peelers_hold.png);
background-size: contain;
background-position: 50%;
background-repeat: no-repeat;
}
.brand__panel .brand__hold img {
width: auto;
height: 100%;
}
.header__wrapper {
height: 90px;
width: 100%;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
z-index: 1000;
background-color: #083838;
position: sticky;
bottom: 0;
}
.menu__button {
width: 30px;
height: auto;
cursor: pointer;
display: block;
margin: 0 auto;
position: relative;
z-index: 1000;
}
.menu__button svg rect {
fill: #083838;
}
.menu__button.white svg rect {
fill: #fff;
}
.bg__green {
background-color: #083838;
color: #fff;
}
.padded__panel__extra {
padding: 7rem 0;
}
gsap.registerPlugin(ScrollTrigger);
ScrollTrigger.create({
trigger: '.brand__panel',
start: 'top top',
pin: '.header__wrapper',
pinSpacing: false,
end: '+=3500',
markers: true
});
var intro_tl = gsap.timeline({
scrollTrigger: {
trigger: '.brand__panel',
start: 'top top',
pin: true,
pinSpacing: true,
anticipatePin: true,
end: '+=3500',
scrub: true,
}
});
intro_tl.to('.cls-13', {
scaleX: 10,
scaleY: 10,
transformOrigin: 'center center',
ease: 'none',
})
.to('.cls-2', {
scaleX: 1.6,
scaleY: 1.6,
transformOrigin: 'center center',
}, 0);
ScrollTrigger.create({
trigger: '.header__wrapper',
start: 'top top',
pin: '.menu__button',
pinSpacing: false,
end: '+=999999999999',
markers: true,
refreshPriority: 1
});
Also see: Tab Triggers