Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

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.

+ 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

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.

HTML

              
                <section class="hero">
  <div class="grid-container">
    <div class="grid-x bubbles">
      <div class="cell phone-container">
        <img class="phone-image" src="https://res.cloudinary.com/dxpxzn3y0/image/upload/v1617060386/phone-no-logo_gjwf01.png">

        <div class="chat left">
          <div class="picture">
            <img src="https://res.cloudinary.com/dxpxzn3y0/image/upload/v1617060598/profile-picture_hpjmnv.png">
          </div>
          <div class="message paragraph medium">
            ¡Hola! 👋🏼 Necesito ayuda con mi servicio de atención a clientes.
          </div>
        </div>
        
        <div class="chat right">
          <div class="picture">
            <img src="https://res.cloudinary.com/dxpxzn3y0/image/upload/v1617060598/profile-picture_hpjmnv.png">
          </div>
          <div class="message paragraph medium">
            Bienvenida a la experiencia Blurb, estamos felices de poder ayudarte.  😉
          </div>
        </div>
        
        <div class="chat left">
          <div class="picture">
            <img src="https://res.cloudinary.com/dxpxzn3y0/image/upload/v1617060598/profile-picture_hpjmnv.png">
          </div>
          <div class="message paragraph medium">
            ¿Qué es Blurb?  🤔
          </div>
        </div>
        
        <div class="chat right">
          <div class="picture">
            <img src="https://res.cloudinary.com/dxpxzn3y0/image/upload/v1617060598/profile-picture_hpjmnv.png">
          </div>
          <div class="message paragraph medium">
            Somos un servicio de asistencia por mensajería instantánea basado en tecnología.
          </div>
        </div>
        
        <div class="chat right">
          <div class="picture">
            <img src="https://res.cloudinary.com/dxpxzn3y0/image/upload/v1617060598/profile-picture_hpjmnv.png">
          </div>
          <div class="message paragraph medium">
            Automatizamos tus conversaciones resolviendo dudas de
          </div>
        </div>
        
        <div class="chat right">
          <div class="picture">
            <img src="https://res.cloudinary.com/dxpxzn3y0/image/upload/v1617060598/profile-picture_hpjmnv.png">
          </div>
          <div class="message paragraph medium">
            tus clientes de forma rápida utilizando Inteligencia artificial. 🤖
          </div>
        </div>
        
        <div class="chat left">
          <div class="picture">
            <img src="https://res.cloudinary.com/dxpxzn3y0/image/upload/v1617060598/profile-picture_hpjmnv.png">
          </div>
          <div class="message paragraph medium">
            ¡Quiero saber más! ¿Cómo empezamos? 😀
          </div>
        </div>

      </div>
    </div>
  </div>
</section>
<section class="long-space">
  
</section>
              
            
!

CSS

              
                .hero {
  position: relative;

  .grid-container {
    position: relative;
  }

  .gradient {
    width: 100%;
    height: 50vh;
    min-height: 450px;
    position: absolute;
    background: blue;
  }

  .bubbles {
    display: flex;
    justify-content: center;
  }

  .phone-container {
    display: flex;
    margin-top: 100px;
    justify-content: center;

    width: 40vh;
    height: 80vh;
    position: relative;

    .phone-image {
      width: 40vh;
      height: 80vh;
      min-width: 276px;
      min-height: 550px;
      filter: drop-shadow(20px 40px 40px rgba(#000, 0.25));
    }
  }

  .button {
    top: 78%;
    left: 50%;
    font-size: 1.6rem;
    position: absolute;
    transform: translateX(-50%);
  }

  .chat {
    bottom: 0;
    opacity: 0;
    position: absolute;
    width: 60px;

    z-index: 10;
    align-items: center;
    display: inline-flex;
    border-radius: 100px;
    background: #211542;
    padding: 10px 20px 10px 10px;

    &.right {
      right: 0;
    }

    &.left {
      left: 0;
    }
  }

  .picture {
    display: flex;
    min-width: 41px;
    min-height: 41px;
    margin-right: 10px;
    border-radius: 41px;
    align-items: center;
    justify-content: center;
    background: linear-gradient(73.37deg, #ba68ca 14.35%, #ff745b 117.34%);
  }

  .message {
    width: 157px;
    color: #fff;
    text-align: left;
    font-size: 12px;
    font-weight: 500;
  }
}

.long-space {
  height: 1500px;
}

              
            
!

JS

              
                gsap.registerPlugin(ScrollTrigger);

gsap.timeline({
  scrollTrigger: {
    trigger: ".hero",
    start: "top top",
    pin: true,
    scrub: 0.8
  }
});

let chats = gsap.utils.toArray(".chat");

chats.forEach((section, index) => {
  gsap
    .timeline({
      scrollTrigger: {
        trigger: section,
        start: () => {
          return "top+=" + index * 70 + "px bottom-=20%";
        },
        end: () => {
          return "top+=" + index * 70 + "px top";
        },
        scrub: true,
        markers: true
      }
    })
    .to(section, { bottom: "120%", ease: 'none' })
    .to(section, {opacity: 1, duration: 0.1 }, "<")
    .to(section, { width: '238px', duration: 0.1 }, "<")
});

              
            
!
999px

Console