Pen Settings

HTML

CSS

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

JavaScript

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

Packages

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.

Behavior

Auto Save

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.

HTML

              
                           <!-- first code that i want to keep just in case
<html>
  <div class="anderson">
  <div class="selected-works">Selected Works</div>
  <div class="selected-works-wrapper">About</div>
  <div class="wes-anderson">Wes Anderson</div>
</div>
  <head>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="globals.css" />
    <link rel="stylesheet" href="style.css" />
  </head>
  <body>
    <div class="anderson">
      <div class="anderson-it">
        <div class="overlap-group">
          <div class="rectangle"></div>
          <img class="img" src="img/rectangle-20.png" />
          <div class="div"></div>
          <div class="rectangle-2"></div>
          <img class="img-henry-sugar" src="https://assets.codepen.io/12495092/img+8%2C+henry+sugar.png" />
          <img class="img-hero" src="https://assets.codepen.io/12495092/img+1%2C+hero.png" />
          <div class="text-wrapper">WES</div>
          <div class="budapest">BUDAPEST</div>
          <img class="rectangle-3" src="https://assets.codepen.io/12495092/Rectangle+15.png" />
          <img class="img-budapest" src="https://assets.codepen.io/12495092/img+9%2C+budapest.png" />
          <img class="img-budapest-2" src="https://assets.codepen.io/12495092/img+10%2C+budapest.png" />
          <img class="img-budapest-3" src="https://assets.codepen.io/12495092/img+11%2C+budapest.png" />
          <img class="imug-bdapest-4" src="img/image.png" />
          <img class="img-the-french" src="https://assets.codepen.io/12495092/img+13%2C+the+french.png" />
          <img class="img-budapest-6" src="https://assets.codepen.io/12495092/img+12%2C+budapest.png" />
          <div class="text-wrapper-2">HOTEL</div>
          <img class="img-the-french-2" src="https://assets.codepen.io/12495092/img+17%2C+the+french.png" />
          <img class="img-the-french-3" src="https://assets.codepen.io/12495092/img+15%2C+the+french.png" />
          <div class="dispatch">DISPATCH</div>
          <img class="img-the-french-4" src="https://assets.codepen.io/12495092/img+19%2C+the+french.png" />
          <img class="img-the-french-5" src="https://assets.codepen.io/12495092/img+20%2C+the+french.png" />
          <img class="img-the-french-6" src="https://assets.codepen.io/12495092/img+18%2C+the+french.png" />
          <div class="text-wrapper-3">THE FRENCH</div>
          <div class="wes-anderson"><div class="text-wrapper-4">Wes Anderson</div></div>
          <div class="text-wrapper-5">HENRY</div>
          <div class="text-wrapper-6">SUGAR</div>
          <img class="img-henry-sugar-2" src="https://assets.codepen.io/12495092/img+2%2C+henry+sugar.png" />
          <img class="img-henry-sugar-3" src="https://assets.codepen.io/12495092/img+4%2C+henry+sugar.png" />
          <img class="img-henry-sugar-4" src="https://assets.codepen.io/12495092/img+5%2C+henry+sugar.png" />
          <img class="image-henry-sugar" src="https://assets.codepen.io/12495092/image+6%2C+henry+sugar.png" />
          <img class="img-henry-sugar-5" src="https://assets.codepen.io/12495092/img+3%2C+henry+sugar.png" />
          <div class="text-wrapper-7">ANDERSON</div>
          <div class="text-wrapper-8">THE GRAND</div>
          <img class="img-the-french-7" src="https://assets.codepen.io/12495092/img+16%2C+the+french.png" />
        </div>
        <div class="selected-works"><div class="text-wrapper-9">Selected works</div></div>
        <div class="selected-works-wrapper"><div class="selected-works-2">About</div></div>
      </div>
    </div>
  </body>
</html>
-->
<html>
</head>
<body>
    <div class="anderson">
        <div class="anderson-it">
            <div class="overlap-group animated-element">
                <div class="rectangle"></div>
                <img class="img animated-element" src="img/rectangle-20.png" alt="Rectangle">
                <div class="div animated-element"></div>
                <div class="rectangle-2 animated-element"></div>
                <img class="img-henry-sugar animated-element" src="https://assets.codepen.io/12495092/img+8%2C+henry+sugar.png" alt="Henry Sugar">
                <img class="img-hero animated-element" src="https://assets.codepen.io/12495092/img+1%2C+hero.png" alt="Hero">
                <div class="text-wrapper animated-element">WES</div>
                <div class="budapest animated-element">BUDAPEST</div>
                <img class="rectangle-3 animated-element" src="https://assets.codepen.io/12495092/Rectangle+15.png" alt="Rectangle">
                <img class="img-budapest animated-element" src="https://assets.codepen.io/12495092/img+9%2C+budapest.png" alt="Budapest">
                <img class="img-budapest-2 animated-element" src="https://assets.codepen.io/12495092/img+10%2C+budapest.png" alt="Budapest">
                <img class="img-budapest-3 animated-element" src="https://assets.codepen.io/12495092/img+11%2C+budapest.png" alt="Budapest">
                <img class="img-budapest-4 animated-element" src="https://assets.codepen.io/12495092/img+14%2C+budapest.png" alt="ima">
                <img class="img-the-french animated-element" src="https://assets.codepen.io/12495092/img+13%2C+the+french.png" alt="The French">
                <img class="img-budapest-6 animated-element" src="https://assets.codepen.io/12495092/img+12%2C+budapest.png" alt="Budapest">
                <div class="text-wrapper-2 animated-element">HOTEL</div>
                <img class="img-the-french-2 animated-element" src="https://assets.codepen.io/12495092/img+17%2C+the+french.png" alt="The French">
                <img class="img-the-french-3 animated-element" src="https://assets.codepen.io/12495092/img+15%2C+the+french.png" alt="The French">
                <div class="dispatch animated-element">DISPATCH</div>
                <img class="img-the-french-4 animated-element" src="https://assets.codepen.io/12495092/img+19%2C+the+french.png" alt="The French">
                <img class="img-the-french-5 animated-element" src="https://assets.codepen.io/12495092/img+20%2C+the+french.png" alt="The French">
                <img class="img-the-french-6 animated-element" src="https://assets.codepen.io/12495092/img+18%2C+the+french.png" alt="The French">
                <div class="text-wrapper-3 animated-element">THE FRENCH</div>
                <div class="wes-anderson animated-element"><div class="text-wrapper-4">Wes Anderson</div></div>
                <div class="text-wrapper-5 animated-element">HENRY</div>
                <div class="text-wrapper-6 animated-element">SUGAR</div>
                <img class="img-henry-sugar-2 animated-element" src="https://assets.codepen.io/12495092/img+2%2C+henry+sugar.png" alt="Henry Sugar">
                <img class="img-henry-sugar-3 animated-element" src="https://assets.codepen.io/12495092/img+4%2C+henry+sugar.png" alt="Henry Sugar">
                <img class="img-henry-sugar-4 animated-element" src="https://assets.codepen.io/12495092/img+5%2C+henry+sugar.png" alt="Henry Sugar">
                <img class="image-henry-sugar animated-element" src="https://assets.codepen.io/12495092/image+6%2C+henry+sugar.png" alt="Henry Sugar">
                <img class="img-henry-sugar-5 animated-element" src="https://assets.codepen.io/12495092/img+3%2C+henry+sugar.png" alt="Henry Sugar">
                <div class="text-wrapper-7 animated-element">ANDERSON</div>
                <div class="text-wrapper-8 animated-element">THE GRAND</div>
                <img class="img-the-french-7 animated-element" src="https://assets.codepen.io/12495092/img+16%2C+the+french.png" alt="The French">
            </div>
            <div class="selected-works animated-element"><div class="text-wrapper-9">Selected works</div></div>
            <div class="selected-works-wrapper animated-element"><div class="selected-works-2">About</div></div>
          <div class="anderson">
        </div>
    </div>
    <script src="script.js"></script>
</body>
</html>

              
            
!

CSS

              
                @font-face {
  font-family: 'Helotypo';
  src: url('https://assets.codepen.io/12495092/Helotypo.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
 font-feature-settings: "liga" 0. ;
}

.animated-element {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease-out, transform 1s ease-out;
    margin: 20px 0;
}

.animated-element.visible {
    opacity: 1;
    transform: translateY(0);
}

.overlap-group {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.anderson {
  background-color: #624f25;
  display: flex;
  flex-direction: row;
  justify-content: center;
  width: 100%;
}

.anderson .anderson-it {
  background-color: #624f25;
  overflow-x: hidden;
  width: 1512px;
  height: 4616px;
  position: relative;
}

.anderson .overlap-group {
  position: absolute;
  width: 1533px;
  height: 4510px;
  top: 106px;
  left: -10px;
}

.anderson .rectangle {
  position: absolute;
  width: 1512px;
  height: 1508px;
  top: 3002px;
  left: 10px;
  background-color: #cfcb9c;
}

.anderson .img {
  position: absolute;
  width: 318px;
  height: 364px;
  top: 1644px;
  left: 609px;
}

.anderson .div {
  position: absolute;
  width: 1512px;
  height: 1214px;
  top: 1799px;
  left: 10px;
  background-color: #ffd8ec;
}

.anderson .rectangle-2 {
  position: absolute;
  width: 1512px;
  height: 964px;
  top: 846px;
  left: 10px;
  background-color: #d9d5a7;
}

.anderson .img-henry-sugar {
  position: absolute;
  width: 318px;
  height: 364px;
  top: 1610px;
  left: 608px;
  object-fit: cover;
}

.anderson .img-hero {
  position: absolute;
  width: 876px;
  height: 558px;
  top: 106px;
  left: 328px;
  object-fit: cover;
}

.anderson .text-wrapper {
  position: absolute;
  top: 0;
  left: 98px;
  font-family: 'Helotypo';
  font-weight: 400;
  color: #d6bb8e;
  font-size: 250px;
  letter-spacing: 0;
  line-height: normal;
  white-space: nowrap;
  color: #d6bb8e;
  font-size: 250px;
}

.anderson .budapest {
  position: absolute;
  top: 2549px;
  left: 152px;
  font-family: 'Helotypo';
  font-weight: 400;
  font-size: 250px;
  letter-spacing: 0;
  line-height: normal;
  white-space: nowrap;
  color: #784283;
}

.anderson .rectangle-3 {
  position: absolute;
  width: 318px;
  height: 364px;
  top: 1610px;
  left: 98px;
  object-fit: cover;
}

.anderson .img-budapest {
  position: absolute;
  width: 318px;
  height: 364px;
  top: 2023px;
  left: 608px;
  object-fit: cover;
}

.anderson .img-budapest-2 {
  position: absolute;
  width: 318px;
  height: 357px;
  top: 2193px;
  left: 98px;
}

.anderson .img-budapest-3 {
  position: absolute;
  width: 318px;
  height: 357px;
  top: 2193px;
  left: 1113px;
}

.anderson .img-budapest-4 {
  position: absolute;
  width: 318px;
  height: 364px;
  top: 1610px;
  left: 1113px;
  object-fit: cover;
}

.anderson .img-the-french {
  position: absolute;
  width: 318px;
  height: 364px;
  top: 2890px;
  left: 608px;
  object-fit: cover;
}

.anderson .img-budapest-5 {
  position: absolute;
  width: 318px;
  height: 364px;
  top: 2890px;
  left: 1113px;
}

.anderson .img-budapest-6 {
  position: absolute;
  width: 318px;
  height: 364px;
  top: 2890px;
  left: 97px;
}

.anderson .text-wrapper-2 {
  position: absolute;
  top: 2796px;
  left: 390px;
  font-family: 'Helotypo';
  font-weight: 400;
  color: #784283;
  font-size: 250px;
  letter-spacing: 0;
  line-height: normal;
  white-space: nowrap;
}

.anderson .img-the-french-2 {
  position: absolute;
  width: 318px;
  height: 357px;
  top: 3396px;
  left: 1113px;
}

.anderson .img-the-french-3 {
  position: absolute;
  width: 318px;
  height: 357px;
  top: 3396px;
  left: 98px;
}

.anderson .dispatch {
  position: absolute;
  top: 3661px;
  left: 170px;
  font-family: 'Helotypo';
  font-weight: 400;
  color: #cb654f;
  font-size: 250px;
  letter-spacing: 0;
  line-height: normal;
  white-space: nowrap;
}

.anderson .img-the-french-4 {
  position: absolute;
  width: 318px;
  height: 357px;
  top: 4097px;
  left: 98px;
}

.anderson .img-the-french-5 {
  position: absolute;
  width: 318px;
  height: 357px;
  top: 4097px;
  left: 1116px;
}

.anderson .img-the-french-6 {
  position: absolute;
  width: 318px;
  height: 364px;
  top: 3805px;
  left: 607px;
}

.anderson .text-wrapper-3 {
  top: 3096px;
  left: 0;
  position: absolute;
  font-family: 'Helotypo';
  font-weight: 400;
  color: #cb654f;
  font-size: 243px;
  letter-spacing: 0;
  line-height: normal;
  white-space: nowrap;
  font-feature-settings: "liga" 0
}

.anderson .wes-anderson {
  position: absolute;
  width: 143px;
  height: 28px;
  top: 4426px;
  left: 695px;
}
/* Wes Anderson footer */
.anderson .text-wrapper-4 {
  position: absolute;
  top: -1px;
  left: 0;
  font-family: "Helvetica", Helvetica;
  font-weight: 400;
  font-size: 24px;
  text-align: center;
  letter-spacing: 0;
  line-height: normal;
  white-space: nowrap;
  color: #CB654F; /* Default text color */
  opacity: 1; /* Initially visible */
  transition: color 0.3s ease; /* Smooth transition for color change */
}

/* Hover state */
.anderson .selected-works:hover .text-wrapper-4 {
  color: #AE5541; /* Change text color on hover */
}

/* Pressed state */
.anderson .selected-works:active .text-wrapper-4 {
  color: #954938; /* Revert text color to default when pressed */
}

}
.anderson {
    position: relative; 
}
.text-wrapper-5 {
  position: absolute;
top: 935px;
left: 350px;
font-family: 'Helotypo';
  src: url('path/to/Helotypo.ttf') format('truetype');
font-weight: 400;
color: #d96907;
font-size: 250px;
letter-spacing: 0;
line-height: normal;
white-space: nowrap;
font-feature-settings: "liga" 0
}

.anderson .text-wrapper-6 {
  position: absolute;
  top: 1501px;
  left: 344px;
  font-family: 'Helotypo';
  font-weight: 400;
  color: #d96907;
  font-size: 250px;
  letter-spacing: 0;
  line-height: normal;
  white-space: nowrap;
  font-feature-settings: "liga" 0
}

.anderson .img-henry-sugar-2 {
  position: absolute;
  width: 318px;
  height: 364px;
  top: 652px;
  left: 99px;
  object-fit: cover;
}

.anderson .img-henry-sugar-3 {
  position: absolute;
  width: 318px;
  height: 364px;
  top: 1065px;
  left: 609px;
  object-fit: cover;
}

.anderson .img-henry-sugar-4 {
  position: absolute;
  width: 318px;
  height: 357px;
  top: 1235px;
  left: 99px;
}

.anderson .image-henry-sugar {
  position: absolute;
  width: 318px;
  height: 357px;
  top: 1235px;
  left: 1114px;
}

.anderson .img-henry-sugar-5 {
  position: absolute;
  width: 318px;
  height: 364px;
  top: 649px;
  left: 1114px;
  object-fit: cover;
}

.anderson .text-wrapper-7 {
  position: absolute;
  top: 539px;
  left: 98px;
  font-family: 'Helotypo';
  font-weight: 400;
  color: #d6bb8e;
  font-size: 250px;
  letter-spacing: 0;
  line-height: normal;
  white-space: nowrap;
  font-feature-settings: "liga" 0
}

.anderson .text-wrapper-8 {
  top: 1893px;
  left: 61px;
  position: absolute;
  font-family: 'Helotypo';
  font-weight: 400;
  color: #784283;
  font-size: 250px;
  letter-spacing: 0;
  line-height: normal;
  white-space: nowrap;
  font-feature-settings: "liga" 0
}

.anderson .img-the-french-7 {
  position: absolute;
  width: 318px;
  height: 364px;
  top: 3226px;
  left: 608px;
  object-fit: cover;
}
  .animated-element img {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease-out, transform 0.3s ease-out; /* Example transition for transform */
}

.animated-element.visible img {
    opacity: 1;
    transform: translateY(0);
}

.animated-element img:hover {
    transform: translateY(-10px); /* Example translation on hover */
}

}

.anderson .text-wrapper-9 {
  position: absolute;
  top: -1px;
  left: 0;
  font-family: "Lora", Lora;
  font-weight: 400;
  color: #ffffff;
  font-size: 16px;
  letter-spacing: 0;
  line-height: normal;
  white-space: nowrap;
}

.anderson .selected-works-wrapper {
  position: absolute;
  width: 109px;
  height: 18px;
  top: 26px;
  left: 1312px;
}

/* Default styles */
.anderson .selected-works,
.anderson .selected-works-2 {
  position: absolute;
  cursor: pointer;
  font-family: "Helvetica", Helvetica;
  font-weight: 400;
  font-size: 16px;
  line-height: normal;
  white-space: nowrap;
  color: #ffffff;
    transition: color 0.3s ease; /* Smooth transition for color change */
/* Default text color */
}

.anderson .selected-works {
  width: 109px;
  height: 18px;
  top: 26px;
  left: 88px;
}

.anderson .selected-works-2 {
  top: -1px;
  left: 67px;
  text-align: right;
}

/* Hover state - changing text color */
.anderson .selected-works:hover .text-wrapper-9,
.anderson .selected-works-2:hover {
  color: #d7d7d7; /* Text color on hover */
}

/* Pressed state - changing text color */
.anderson .selected-works:active .text-wrapper-9,
.anderson .selected-works-2:active {
  color: #cb654f; /* Text color when pressed */
}

}
              
            
!

JS

              
                document.addEventListener('DOMContentLoaded', () => {
    const elements = document.querySelectorAll('.animated-element');

    const observer = new IntersectionObserver(entries => {
        entries.forEach(entry => {
            if (entry.isIntersecting) {
                entry.target.classList.add('visible');
            } else if (entry.boundingClientRect.top > 0) {
                entry.target.classList.remove('visible');
            }
        });
    }, {
        threshold: 0.1
    });

    elements.forEach(element => {
        observer.observe(element);
    });
});

              
            
!
999px

Console