Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

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.

+ add another resource


Babel includes JSX processing.

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


Add Packages

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.


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.


                <section id="landing-page" class="hero-story hero hero1">
  <div class="full-col width-100">
    <h1>Landing Screen</h1>

<section id="rooms" class="hero-story hero second-hero hero2">
  <div class="left-col width-33">
    <h2>Des chambres pour vous</h2>
  <div class="right-col width-66 delayed">
    <h2>Contenu pour les chambres</h2>

<section id="you" class="hero-story hero second-hero hero3">
  <div class="left-col width-33 delayed">
    <h2>Contenu gauche pour proche de vous</h2>
  <div class="middle-col width-33">
    <h2>Proche de vous</h2>
  <div class="right-col width-33 delayed">
    <h2>Contenu droite pour proche de vous</h2>

<section id="near" class="hero-story hero second-hero hero4">
  <div class="left-col width-66 delayed">
    <h2>Contenu pour proche de tout</h2>
  <div class="right-col width-33">
    <h2>Proche de tout</h2>

<footer class="hero-story hero second-hero hero5">
  <h2>Contenu du footer</h2>


                body {
  overflow-x: hidden;
footer {
	display: flex;
	height: 100vh;
	width:  100%;
.left-col, .middle-col, .right-col, .full-col{
	height: 100vh;
	margin: 0;
	width: 0;
	width: 33.33%;
	width: 66.66%;
	width: 100%;
#landing-page .full-col{
	background-color: grey;
#rooms .left-col{
	background-color: red;
#rooms .right-col{
	background-color: pink;
#you .middle-col{
	background-color: green;
#you .left-col,
#you .right-col{
	background-color: palegreen;
#near .right-col{
	background-color: blue;
#near .left-col{
	background-color: lightblue;
	background-color:  black;
	color:  white;



                const sections = document.querySelectorAll("section");

// this scrolling object just allows us to conveniently call scrolling.enable(), scrolling.disable(), and check if scrolling.enabled is true. 
// some browsers (like iOS Safari) handle scrolling on a separate thread and can cause things to get out of sync (jitter/jumpy), so when we're animating the scroll position, force an update of GSAP tweens when there's a scroll event in order to maintain synchronization)
const scrolling = {
    enabled: true,
    events: "scroll,wheel,touchmove,pointermove".split(","),
    prevent: e => e.preventDefault(),
    disable() {
      if (scrolling.enabled) {
        scrolling.enabled = false;
        window.addEventListener("scroll", gsap.ticker.tick, {passive: true});, i) => (i ? document : window).addEventListener(e, scrolling.prevent, {passive: false}));
    enable() {
      if (!scrolling.enabled) {
        scrolling.enabled = true;
        window.removeEventListener("scroll", gsap.ticker.tick);, i) => (i ? document : window).removeEventListener(e, scrolling.prevent));

function goToSection(section, anim, i) {
  if (scrolling.enabled) { // skip if a scroll tween is in progress
    scrolling.disable();, {
      scrollTo: {y: section, autoKill: false},
      onComplete: scrolling.enable,
      duration: 1

    anim && anim.restart();

sections.forEach((section, i) => {
  const intoAnim = gsap.from(section.querySelector(".right-col"), {yPercent: 50, duration: 1, paused: true});
    trigger: section,
    start: "top bottom-=1",
    end: "bottom top+=1",
    onEnter: () => goToSection(section, intoAnim),
    onEnterBack: () => goToSection(section)