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 class="menu">
<div class="menu-item_1">L’DD DDDD</div>
<div class="menu-item_2">LA CRDFGHME DDDD DDDHGHJK</div>
<div class="menu-item_3">GHJ DFGH FGHJ</div>
</div>
<div class="arrow"><img src="https://www.hello-zone.org/codepen/frames/arrow.png"></div>
<div id="smooth-wrapper">
<div class="tout" id="">
<!-- <div class="canvas-wrapper">
</div> -->
<canvas id="animation_3D"></canvas>
<section class="section section-1" id="one">
<div class="text">
<div class="title-large">GFGFJHGJGKJHG<br />FHJHKJGH :<br />JHGJKHJKHJK</div>
<div class="paragra">sfkjhsdjfhsdjklfh lksdhfklsdjfkjsdkfjsdmfjmsjfmjsdmfjmsdjfmlsjd fmjsdmlfjs mdjfmlsdjflmsdjfsfk jhsdjfhsdj klfhlksdhfklsdjfk jsdkfjsdmf jmsjfmjsdmfjmsdjfmls jdfm sdmlfjsmdjf mlsdjf lmsdjfsfkjhsd jfhsdjklfhlksd hfklsdjfkjsdkfjsdmfjmsjfmjsdmfj msdjfmlsjdfmjsdml fjsmdjfmlsdjflmsdjfsfk jhsdjfhsdjklfhlksdh fklsdjfkjsdkfj sdmfjmsjfmjs dmfjmsdjfmlsjdfmjsdm lfjsmdjf mlsdjflmsdjf.</div>
</div>
</section>
<section class="section section-2">
<img src="https://www.stephanekouchian.com/wp-content/uploads/2021/11/SK_02274-RWK.jpg">
</section>
<section class="section section-3">
<div class="text">
<div class="title-small">HGDHGDHD GDHGD DGDJHGDJHD </div>
<div class="paragra">sfkjhsdjfhsdjklfh lksdhfklsdjfkjsdkf jsdmfjmsjfmjsdmf jmsdjfm lsjdfmjsdmlfjs mdjfmlsdjflmsdjfsfkjh sdjfhsdjklfhlksdhfklsd jfkjsdkfj dmfj msjfmjsdmfjmsd jfmlsjdfmjsdmlf jsmdjfml sdjflmsdjfsfkj hsdjfhsdjklfhlksdhfklsdj fkjsdkfjsd mfjmsjfmjsdmfjmsdjfmlsjd fmjsdmlfjsmdjfmlsdjflmsdjf.<br /><br />
sfkjhsdjfhsdjklfhl ksdhfkls djfkjsdkfjsd mfjmsjfmjsdm fjmsdjfmlsjdfmjsdm lfjsmdjfmlsdjflmsdjf.<br /><br />
sfkjhsdjfhsdjklfhl ksdhfklsdjfkjsdkfjsdmfjmsjfmjsdmf jmsdjfml sjdfmjsdmlfj smdjfmlsdjflmsdjf.<br /><br />
sfkjhsdjfhsdjklfhlk sdhfklsdjfkjsdkfjsd mfjmsjfmjsdmfjmsdjfmlsjdfmjsdmlfjsmdjf mlsdjflmsdjf.</div>
</div>
</section>
<section class="section section-4">
<img src="images/https://www.stephanekouchian.com/wp-content/uploads/2021/11/RK000062.jpg">
</section>
<section class="section section-5">
<div class="text">
<div class="title-small">DDD REVEDRSE DD POUR<br />LA DD FODDDIS dDD DD DDD DD</div>
<div class="paragra">sfkjhsdjfh sdjklfhlksdhfkl sdjfkjsdkfjsdmfj msjfmjsdmf jmsdjfmlsjdfmjsdml fjsmdjfmls djflms djfsfkjhsdjfhsdjklfhlksd hfklsdjfkjsdkf jsdmfjm sjfmjsdmfjmsdj fmlsjdfmjsdmlfjsmdjfm lsdjflms djfsfkjh sdjfhsdjklfhlk sdhfklsdjfkjsdk fjsdmfjmsjfmj sdmfjmsdjfmlsjd fmjsdmlfjsmdjfmlsdjflmsdjf.</div>
<br /><br />
<span class="open-popup open-popup-1">Cliquer ici pour plus d’informations</span>
</div>
</section>
<section class="section section-9">
<img src="images/https://www.stephanekouchian.com/wp-content/uploads/2021/11/SK_02547-RWK.jpg">
</section>
<section class="section section-10" id="two">
<div class="text">
<div class="title-medium">DDD FDS FGH CDF-DDD,</div>
<div class="title-large">DD FFFG DFG<br />FGH</div>
<div class="paragra">sfkjhsdjfhsdjkl fhlksdhfklsdjfkjsd kfjsdmfjmsjfmjsdmfjmsdjfmls jdfmjsdml fjsmdj fmlsdjf lmsdjfsfk jhsdjfhsd jklfhlksdhfklsdj fkjsdkfjsdm fjmsjfmjs dmfjms djfmlsjdfmjsdmlfjsmdjfml sdjflmsdjfsfkjhsdjfhsdjklfh lksdhfklsdj fkjsdkfj sdmfjmsjfmjs dmfjmsd jfmlsjdfmjsdmlfj smdjfmlsdjflmsdjf.</div>
<br /><br />
<span class="open-popup open-popup-2">Cliquer ici pour plus d’informations</span>
</div>
</section>
<section class="section section-11">
<img src="images/https://www.stephanekouchian.com/wp-content/uploads/2021/11/SK_02559.jpg">
</section>
<section class="section section-12" id="three">
<div class="text">
<div class="title-medium">UN FGH</div>
<div class="title-large">EXTHGJK</div>
<div class="paragra">sfkjhsd jfhsdjklfh lksdhfklsdjfkjsd kfjsdmfjmsjfmjsdmfjm sdjfmlsjdfmj sdmlfjsmdj fmlsdjflms djfs fkjhsdjfhsdjklf hlksdhfklsdj fkjsdkfjsdm fjmsjfm jsdmf jmsdjfmlsjdfm jsdmlfjs mdjfmlsdjflmsdjf.</div>
</div>
</section>
<section class="section section-13">
<img src="images/https://www.stephanekouchian.com/wp-content/uploads/2021/11/SK_02510.jpg">
</section>
<section class="section section-14">
<div class="text">
<div class="title-small">GHD DHDHDH DHDHD DHD<br />DGDG DGH DGDHDH HD</div>
<div class="paragra">sfkjhsdj fhsdjklf hlksdhfklsdjfkj sdkfjsdmf jmsjfmjsdmfjmsdj fmlsjdfmjsdm lfjsmdjfmlsdjflmsdjf.<br /><br />
</div>
</div>
</section>
<section class="section section-15">
<img src="images/https://www.stephanekouchian.com/wp-content/uploads/2021/11/SK_02553-RWK.jpg">
</section>
<section class="section section-16">
<div class="half">
<img src="images/Science_WEB_7.jpg">
</div>
<div class="text half">
<div class="title-small">DDGDG DGGD HGDD<br />DDDF DG DD<br />DD DDD DD</div>
<div class="paragra">sfkjhs jfhsd klfhlksdhfklsdjfkjsdkfjs dmfjmsjfmjsdmfjmsdjfmlsjdfmjsdmlfjs mdjfmlsdjf lmsdjfs fkjhsdjfhsdjklfhl ksdhfklsdjfkjsdkfjsdmfjmsjfmjsdmfjmsd jfmlsjd fmjsdm lfjsm djfmlsdjflmsdjf.<br /><br />
sfkjhsdjfhsdjklfhlksd hfklsdjf kjsdkfjsdmfjmsjf mjsdmfjm sdjfmlsjdfmj sdmlfj smdjfmlsd jflmsdjf sfkjhsdjf hsdjklfhlksd hfklsdjfkjs dkfjsdmfjmsjfm jsdmfjms djfmls jdfmjs dmlfjsmdjfm lsdjflmsdjfs fkj hsdjfhsdjkl fhlksd hfklsdjfkj sdkfjsdmfjm sjfmjsdmf jmsdjfm lsjdfmjsdmlfj smdjfm lsdjflms djfsfkjh sdjfhsdjk lfhlks dhfklsdjf kjsdkfjsdmfjmsjf mjsdmfjmsd jfmlsjdfmjsdmlf jsmdjf mlsdjflmsdjf.</div>
</div>
</section>
<section class="section section-17">
<div class="text half">
<div class="title-small">DD DDD DDDD<br />DDD DD DDD À DD...</div>
<div class="paragra">sfkjhsdjfhsdjk lfhlksdhf lsdjfkjsd kfjsdmfjmsj fmjsdmfjmsdjfmlsj dfmjsdm lfjsmdjfmlsdjflmsdjf.<br />
sfkjhsdjfhsdjklfhlksd hfklsdjf kjsdkfjsdmfjmsjf mjsdmfjm sdjfmlsjdfmj sdmlfj smdjfmlsd jflmsdjf sfkjhsdjf hsdjklfhlksd hfklsdjfkjs dkfjsdmfjmsjfm jsdmfjms djfmls jdfmjs dmlfjsmdjfm lsdjflmsdjfs fkj hsdjfhsdjkl fhlksd hfklsdjfkj sdkfjsdmfjm sjfmjsdmf jmsdjfm lsjdfmjsdmlfj smdjfm lsdjflms djfsfkjh sdjfhsdjk lfhlks dhfklsdjf kjsdkfjsdmfjmsjf mjsdmfjmsd jfmlsjdfmjsdmlf jsmdjf mlsdjflmsdjf.</div>
</div>
<div class="half">
<img src="images/https://www.stephanekouchian.com/wp-content/uploads/2021/11/SK_02564-RWK.jpg">
</div>
</section>
<section class="section section-18">
<div class="half">
<img src="https://www.stephanekouchian.com/wp-content/uploads/2021/11/SK_02520-RWK.jpg">
</div>
<div class="text half">
<div class="title-small">...ET ÉDDDCDO-DDD</div>
<div class="paragra">sfkjhsdjfhsdjklfhlk sdhfklsdjf j sdkfjsdmfjmsjfmjsdmf jmsdjfmlsjdfmjsdmlfjs mdjfmlsd jflmsdjf.<br /><br />
</div>
</div>
</section>
<section class="section section-last">
<div style="height:55%;width:80%;margin-top: -10%;">
<div class="image-center"></div>
<span class="open-popup ">Cliquer ici pour découvrir</span>
</div>
<div class="section-footer" style="">
<div>
DDDD<br />
DDDDD DDD DEPARDDDDENT
</div>
<div style="margin-top: 7px;text-align: center;font-family: 'Gill Sans';font-weight: 300;font-style: normal;">
DDD DDD DDDD - DDD DDD DDDDD.
</div>
<div style="position: absolute; right:20px;top:0">
<br /><br /><span class="top">BACK TO TOP</spna>
</div>
</div>
</section>
</div>
</div>
*, *:before, *:after {
-webkit-box-sizing: inherit;
-moz-box-sizing: inherit;
box-sizing: inherit;
position: relative;
}
html{
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
font-size: 18px;
}
body, html{
margin: 0;
padding: 0;
height: 100%;
background-color: #000;
color:#fff;
font-family: 'Gill Sans';
font-weight: 300;
font-style: normal;
line-height: 1.2;
}
body{
font-size: 100%
}
.title-small{
text-align: center;
font-weight: normal;
text-transform: uppercase;
font-style: normal;
font-size: 180%;
margin: 0;
letter-spacing: 0.5px;
line-height: 1.2;
}
.title-medium{
font-weight: normal;
text-transform: uppercase;
font-style: normal;
font-size: 200%;
margin: 0;
letter-spacing: 0.5px;
line-height: 1;
}
.title-large{
font-family: 'Didot';
font-weight: normal;
font-style: normal;
font-size: 420%;
margin: 25px 0;
line-height: 1;
}
/*body{
overflow: hidden;
}*/
.scrollbar-track-x{
display: none !important
}
/*.tout{
height: 100%;
width:100%;
}
.scroll-content, .tout{
height: 100%;
}*/
a{
color:inherit;
text-decoration: none;
}
img{
width: 100%;
height: auto;
display: block;
}
#preloader{
height: 100%;
position: fixed;
top:0;
left:0;
width: 100vw;
background-color: #fff;
z-index: 1000000000000000000
}
.logo-logo{
position: absolute;
top: 50vh;
left: 0;
right: 0;
margin: auto;
margin-top: -114px;
max-width: 850px;
width:57vw;
z-index: 120
}
/************************************ popups ************************************/
.open-popup{
padding: 15px 30px;
border:1px solid #fff;
font-size:80%;
cursor: pointer;
border-radius: 50px;
}
.popup-close{
position: fixed;
top:35px;
right:35px;
width:30px;
height:30px;
background-image: url(../images/close.png);
background-size: contain;
background-position: center center;
cursor: pointer;
}
.popup-txt-in{
line-height: 1.5;
max-width: 850px;
width:85%;
margin: auto;
}
.popup{
width: 100%;
height: 100%;
position: fixed;
z-index: 200;
display: none;
font-size: 85%;
align-items: center;
background-color: #000;
overflow: auto;
padding-top: 40px;
padding-bottom: 40px;
}
.popup-paragra{
margin-top: 40px;
text-align: justify;
}
.text-small{
font-size: 75%;
text-align: center;
}
/************************************ content ************************************/
#animation_3D{
/* margin-top: -100px; */
display: block;
}
.menu{
padding: 15px;
position: fixed;
bottom: 0;
background-color: #000;
z-index: 100;
opacity:0;
display: none;
width: calc(100% - 8px);
text-align: center;
}
.menu div{
cursor: pointer;
}
.arrow{
position: fixed;
bottom: 20px;
left: 0;
right: 0;
margin: auto;
width: 90px;
z-index: 2000000;
opacity:1;
}
.menu div{
display: inline-block;
margin: 0 40px;
}
.scroll-content {
width: calc(100% - 8px);
}
.text{
text-align: center;
margin: auto;
line-height: 1.5;
}
.text .paragra{
margin-top: 60px;
max-width: 680px;
margin-left: auto;
margin-right: auto;
}
/************************************ section ************************************/
.section-white{
background-color: #fff;
color:#000;
}
.section-white .open-popup {
border-color:#000;
}
.section-1{
padding: 110px 0;
}
.section-2 {
height: 100%;
}
.section-2 img{
object-fit: cover;
height: 100%;
width: 100%;
}
.section-3{
padding: 110px 0;
}
.section-4 {
height: 100%;
}
.section-4 img{
object-fit: cover;
height: 100%;
width: 100%;
}
.section-5{
padding: 110px 0
}
.section-6 {
height: 100%;
}
.section-6 img{
object-fit: cover;
height: 100%;
width: 100%;
}
.section-7{
width: 100%;
}
.section-8 {
display: flex;
height: 100%;
align-items: center;
}
.section-9 {
height: 100%;
}
.section-9 img{
object-fit: cover;
height: 100%;
width: 100%;
}
.section-10{
padding: 110px 0
}
.section-11 {
height: 180%;
}
.section-11 img{
object-fit: cover;
height: 100%;
width: 100%;
}
.section-12{
padding: 110px 0
}
.section-13 {
height: 100%;
}
.section-13 img{
object-fit: cover;
height: 100%;
width: 100%;
}
.section-14{
padding: 110px 0
}
.section-15 {
height: 100%;
}
.section-15 img{
object-fit: cover;
height: 100%;
width: 100%;
}
.section-16 img, .section-17 img, .section-18 img{
object-fit: cover;
height: 100%;
width: 100%;
}
.section-16, .section-17, .section-18 {
display: flex;
flex-direction: row;
flex-wrap: wrap;
width: 100%;
height: 100%;
}
.half{
flex-direction: column;
flex: 1;
}
.section-last {
display: flex;
height: 100vh;
align-items: center;
justify-content: center;
text-align: center;
position: relative;
}
canvas {
width: 100%;
height: 100vh;
object-fit: contain;
}
.image-center{
width: 100%;
height: 100%;
background-image: url(../images/fleur.jpg);
background-size: contain;
background-position: center center;
background-repeat: no-repeat;
}
.section-footer{
position: absolute;
bottom: 0;
width: 100%;
left: 0;
right: 0;
border-top: 1px solid #6f6f6f;
color: #c1c1c1;
padding: 15px 0;
text-align: center;
font-family: 'Didot';
font-weight: normal;
font-style: normal;
font-size: 68%;
}
.mute-video{
width: 25px;
height: 25px;
background-size: 100% auto;
position: absolute;
bottom: 20px;
right: 35px;
z-index: 1;
cursor: pointer;
}
.sound-on{
background-image: url("../images/SON_ON.png");
}
.sound-off{
background-image: url("../images/SON_OFF.png");
}
.desktop{
display: block;
}
.mobile{
display: none
}
/* @media only screen and (max-width: 991px) {
.desktop {
display: none;
}
.mobile{
display: block
}
} */
gsap.registerPlugin(ScrollTrigger, ScrollSmoother);
console.clear();
let smoother = ScrollSmoother.create({
content: ".tout",
wrapper: "#smooth-wrapper",
smooth: 1, // how long (in seconds) it takes to "catch up" to the native scroll position
effects: true // looks for data-speed and data-lag attributes on elements
});
const canvas = document.getElementById("animation_3D");
const context = canvas.getContext("2d");
canvas.width = 1080;
canvas.height = 1920;
const frameCount = 46;
const currentFrame = (index) =>
`https://www.hello-zone.org/codepen/frames/ddd_${(index + 1)
.toString()
.padStart(4, "0")}.png`;
const images = [];
const airpods = {
frame: 0
};
for (let i = 0; i < frameCount; i++) {
const img = new Image();
img.src = currentFrame(i);
images.push(img);
}
gsap.to(airpods, {
frame: frameCount - 1,
snap: "frame",
ease: "none",
scrollTrigger: {
scrub: 0.25,
trigger: "#animation_3D",
pin: true,
start: "top top",
end: "+=180%"
},
onUpdate: render // use animation onUpdate instead of scrollTrigger's onUpdate
});
images[0].onload = render;
function render() {
context.clearRect(0, 0, canvas.width, canvas.height);
context.drawImage(images[airpods.frame], 0, 0);
}
Also see: Tab Triggers