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

              
                
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Caveat&family=Comfortaa:wght@400;500&display=swap" rel="stylesheet">


<link rel="stylesheet" type="text/css" href="https://dev.icustomweb.com/unibynew/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="https://dev.icustomweb.com/unibynew/css/resposnive.css">




</head>

<body>

<div class="hero_video">
  <video  autoplay playsinline muted loop>
  <source src="https://dev.icustomweb.com/unibynew/image/Uniby.webm" type="video/webm">
  <source src="https://dev.icustomweb.com/unibynew/image/Uniby.mp4" type="video/mp4">
</video>

<div class="logo">
  <div class="container">
    <div class="row">
      <div class="col text-center">
        <a href=""><img src="https://dev.icustomweb.com/unibynew/image/logo.svg"></a>
      </div>
    </div>
  </div>
</div>

<div class="hero_bottom">
  <div class="container">
    <div class="row justify-content-between">
      <div class="col-md-auto">
        <div class="hero_left_content">
        <h2>Find your crowd.</h2>
        <p class="mb-0 mt-3"><a href=""><img src="https://dev.icustomweb.com/unibynew/image/apple_icon.svg"></a></p>
      </div>
      </div>
        <div class="col-md-auto align-self-end">
        <div class="hero_left_right">
        <p class="mb-0">Meet and connect 
with over 400k London University students.</p>
      </div>
      </div>
    </div>
  </div>
</div>


</div>


<section class="meetup_sec">
  <div class="container">
    <div class="row justify-content-between align-items-center">
      <div class="col-md-5">
        <h3>Attend or host</h3>



        <h2>Student created meetups.</h2>
      
  
          
        <p class="mb-0">Are you looking to expand your circle? Student led meetups all over London.</p>
      </div>
      <div class="col-md-6">
        <div class="image animation1" style="background-image: url('https://dev.icustomweb.com/unibynew/image/img1.png');"></div>
      </div>
    </div>
  </div>
</section>
<section class="meetup_sec pt-0">
  <div class="container">
    <div class="row justify-content-between align-items-center">
        <div class="col-md-6">
        <div class="image animation2" style="background-image: url('https://dev.icustomweb.com/unibynew/image/img2.png');"></div>
      </div>
      <div class="col-md-5">
        <h3>Build real connections</h3>
        <h2 class="my-3">Share your passion.</h2>
        <p class="mb-0">Meet likeminded students who share common interests and hobbies across London.</p>
      </div>
    
    </div>
  </div>
</section>


<section class="activities">
  <div class="container">
    <div class="row justify-content-center">
      <div class="col-xl-10 text-center">
        <h2>Activities for any interests.</h2>
        <p class="mt-4">Make new connections around London by doing more of what you like. 
Create a meetup in seconds and let like-minded students join.</p>
      </div>
    </div>
  </div>
</section>

<section class="activities_sec">
  <div class="image" style="background-image: url(https://dev.icustomweb.com/unibynew/image/slider_img1.png);">
    <h2>Bar hopping</h2>
  </div>
    <div class="image" style="background-image: url(https://dev.icustomweb.com/unibynew/image/slider_img2.png);">
    <h2>Rooftopping</h2>
  </div>
    <div class="image" style="background-image: url(https://dev.icustomweb.com/unibynew/image/slider_img3.png);">
    <h2>Yoga group</h2>
  </div>
    <div class="image" style="background-image: url(https://dev.icustomweb.com/unibynew/image/slider_img4.png);">
    <h2>    Skating</h2>
  </div>
   <div class="image" style="background-image: url(https://dev.icustomweb.com/unibynew/image/slider_img1.png);">
    <h2>Bar hopping</h2>
  </div>
    <div class="image" style="background-image: url(https://dev.icustomweb.com/unibynew/image/slider_img2.png);">
    <h2>Rooftopping</h2>
  </div>
    <div class="image" style="background-image: url(https://dev.icustomweb.com/unibynew/image/slider_img3.png);">
    <h2>Yoga group</h2>
  </div>
    <div class="image" style="background-image: url(https://dev.icustomweb.com/unibynew/image/slider_img4.png);">
    <h2>    Skating</h2>
  </div>
  <div class="btn_last">
  <div class="row">
    <div class="col text-center">
      <a href="" class="btn btn-primary">View more</a>
    </div>
  </div>
</div>
</section>



<!-- jQuery library -->
<script src="https://dev.icustomweb.com/unibynew/js/jquery.min.js"></script>
<script src="https://dev.icustomweb.com/unibynew/js/popper.min.js"></script>
<script src="https://dev.icustomweb.com/unibynew/js/bootstrap.min.js"></script>
<script src="https://dev.icustomweb.com/unibynew/js/gsap.min.js"></script>
<script src="https://dev.icustomweb.com/unibynew/js/ScrollTrigger.min.js"></script>

</body>
</html>
              
            
!

CSS

              
                :root {
  --fnt16: 16px;
  --fnt18: 18px;
  --fnt20: 20px;
  --fnt30: 30px;
  --fnt40: 40px;
  --fnt50: 50px;
  --fnt70: 70px;
  --fnt80: 80px;
  --fnt100: 100px;
}

@font-face {
  font-family: "Circular Std Book";
  src: url("../fonts/Circular Std Book.eot"); /* IE9*/
  src: url("../fonts/Circular Std Book.eot?#iefix") format("embedded-opentype"),
    /* IE6-IE8 */ url("../fonts/Circular Std Book.woff2") format("woff2"),
    /* chrome、firefox */ url("../fonts/Circular Std Book.woff") format("woff"),
    /* chrome、firefox */ url("../fonts/Circular Std Book.ttf")
      format("truetype"),
    /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
      url("../fonts/Circular Std Book.svg#Circular Std Book") format("svg"); /* iOS 4.1- */
}

body {
  font-size: 18px;
  font-family: "Circular Std Book";
  color: #000000;
}
img {
  max-width: 100%;
}

.hero_video video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translateX(-50%) translateY(-50%);
  z-index: -10;
}
.hero_video {
  height: 100vh;
  min-height: 500px;
  overflow: hidden;
  position: relative;
}
.logo {
  padding: 35px 0px;
}
.hero_bottom {
  position: absolute;
  width: 100%;
  bottom: 100px;
}
.hero_left_content h2 {
  font-size: var(--fnt100);
  font-family: "Comfortaa";
  color: #fff;
  line-height: 120px;
}
.hero_left_content {
  max-width: 520px;
}
.hero_left_right {
  max-width: 420px;
  font-size: var(--fnt40);
  color: #fff;
  line-height: 48px;
}
.meetup_sec {
  padding: 120px 0px;
  font-size: var(--fnt30);
  background-color: #fff;
}
.meetup_sec h3 {
  font-family: "Caveat";
  font-size: var(--fnt40);
}
.meetup_sec h2 {
  font-size: var(--fnt80);
  font-family: "Comfortaa";
}
.meetup_sec .image {
  min-height: 700px;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  border-radius: 15px;
}
.meetup_sec .animation1 {
  background-size: 100%;
}
.meetup_sec .animation2 {
  background-size: 100%;
}
.activities {
  padding-top: 150px;
  font-size: var(--fnt30);
}
.activities h2 {
  font-size: var(--fnt80);
  font-family: "Comfortaa";
}
.activities_sec {
  padding: 100px 0px;
  overflow: hidden;
  display: flex;
  flex-wrap: nowrap;
  position: relative;
  margin-left: -13%;
  width: calc(100% + 13%);
}
.activities_sec .image {
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  border-radius: 25px;
  height: 35vw;
  display: flex;
  flex: 0 0 25%;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  justify-content: center;
  position: relative;
  background-color: transparent;
  overflow: hidden;
  margin: 0px 40px;
}

.activities_sec .image:nth-child(even) {
  margin-top: 50px;
}
.activities_sec .image h2 {
  color: #fff;
  position: absolute;
  left: 0px;
  right: 0px;
  margin: 0px auto;
  font-family: "Comfortaa";
  bottom: 50px;
  font-size: var(--fnt30);
  text-align: center;
}
.activities_sec .btn_last {
  position: absolute;
  bottom: 0px;
  left: 0px;
  right: 0px;
  margin: 0px auto;
  width: 100%;
}

              
            
!

JS

              
                /* hero video */


gsap.from(".hero_video video", {
  //position: "fixed",
  scrollTrigger: {
    trigger: ".hero_video video",
    endTrigger: ".meetup_sec",
    end: `top top`,
    markers: true,
    pin: true,
    pinSpacing: false
  }
});




gsap.from(".animation1", {
  backgroundSize: "200%",
  scrollTrigger: {
    trigger: ".animation1",
    end: "top 100",
    markers: true,
    scrub: 1
  }
});

gsap.from(".animation2", {
  backgroundSize: "200%",
  scrollTrigger: {
    trigger: ".animation2",
    end: "top 100",
    markers: true,
    scrub: 1
  }
});





gsap.from(".activities", {
  scrollTrigger: {
    trigger: ".activities",
    start: "top top",
    pin: true,
    pinSpacing: false,
    //end: "+=" + (window.innerHeight/2 + document.querySelector('.activities_sec').scrollWidth),
    end: "+=5000",
    markers: true,
    scrub: 1
  }
});

// Part 1
gsap.to(".activities", {
  autoAlpha: 0,
  scrollTrigger: {
    trigger: ".activities .container",
    start: "top top+=100",
    end: "+=200",
    scrub: 2,
    markers: true
  }
});






let sections = gsap.utils.toArray(".activities_sec .image");

gsap.to(sections, {
  xPercent: -65 * (sections.length - 1),
  ease: "none",
  scrollTrigger: {
    trigger: ".activities_sec",

    pin: true,
    markers: true,
    scrub: 1,
    snap: 1 / (sections.length - 1),
    // base vertical scrolling on how wide the container is so it feels more natural.
    end: "+=3500"
  }
});
              
            
!
999px

Console