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 id="video-slider" class="panel">
    <div class="container-fluid background">
        <div class="embed-responsive embed-responsive-16by9">
            <video class="embed-responsive-item ytplayer youtube" autoplay="" loop="" muted="" playsinline="">
                <source src="https://podlunsek.com/themes/podlunsek/assets/videos/revolux.mp4">
            </video>

        </div>
    </div>
</section>

<section id="brand" class="panel animacija">
    <h1>This is the second section with image in background...</h1>
    <div class="opacity-layer"></div>
    <div class="white-half">
        <div class="text-wrapper">
            <h3>OUR BRAND<br> IS OUR STORY</h3>
            <div class="lead-wrap">
                <p class="lead">Are you bold enough to go on a journey with strangers?</p>
                <div class="line-wrap-large">
                    <div class="line1"></div>
                    <div class="line2"></div>
                </div>
            </div>
            <p class="text">
                The story of the Podlunšek brand is written by the unlimited imagination in the world of technology and
                adventures. This imagination helps us build a bridge between the past and the future. The Podlunšek
                family set the foundations for the Medicop Company over forty years ago. The essence of our being today
                is a reflection of experience, dedication and work in the field of technological innovativeness,
                exploring aerodynamics and ergonomics, a carefully thought out design and a precise placement of every
                little detail. A complete attentiveness to the safety, quality and reliability of all of our products.
                Each of us who paves the way to the best solutions believes in our products, so we take noble steps to
                create movement that saves lives around the world.</p>
        </div>
    </div>
    <div class="img-wrapper brand-galery"></div>
</section>

<section id="technology" class="panel animacija">
    <div class="opacity-layer"></div>
    <div class="white-half">
        <div class="text-wrapper">
            <h3>TECHNOLOGY</h3>
            <div class="lead-wrap">
                <p class="lead">Is our evolution truly your revolution?</p>
                <div class="line-wrap-large">
                    <div class="line1"></div>
                    <div class="line2"></div>
                </div>
            </div>
            <p class="text">
                The passion for life and challenges has brought us to the world of caravanning. We have been exploring
                this world gradually and with small steps. Over time, our own development department has discovered new
                materials and technological processes. We have been meeting people like you. Bold, full of longing for
                adventures. The symbiosis of our knowledge and your wishes is what we call today the revolution of
                caravanning – a perfectly safe and ultra-light pick up removable cabin. We had you in mind throughout
                the entire process of creative and technological development. Our models display a complex design and
                high quality while they provide the luxury of comfort and well-being. They create the feeling of the
                comfort of your own home even when you are thousands of miles away.</p>
        </div>
    </div>
    <div class="img-wrapper technology-gallery"></div>
</section>

<section id="maps">
    <iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d5079.0958443011905!2d14.58582264571447!3d46.043190663917464!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x476531f5969886d1%3A0x400f81c823fec20!2sLjubljana!5e0!3m2!1sen!2ssi!4v1628754578515!5m2!1sen!2ssi" width="100%" height="100%" style="border:0;" allowfullscreen="" loading="lazy"></iframe>
</section>
              
            
!

CSS

              
                body {
    margin: 0;
    font-size: 16px;
    line-height: 1.428571429;
    padding: 0;
    height: 100%;
    font-family: Roboto, sans-serif;
    font-weight: 400;
    background: black;
}
#video-slider {
    height: 100vh;
    overflow: hidden;
   .container-fluid {
       padding: 0;
   }
    h1 {
        position: absolute;
        z-index: 10;
        left: 50%;
        bottom: 98px;
        transform: translateX(-50%);
        color: white;
        font-family: Roboto, sans-serif;
        font-weight: 300;
        font-size: 5rem;
        text-align: left;
        text-shadow: 0px 7px 8px rgba(0, 0, 0, 0.45);
b {
    font-weight: 700;
}
    }
}
.panel {
    overflow: hidden;
    height: 100vh;
    position: sticky;
    top: 0;
}
#brand, #technology {
    position: relative;
    h1 {
        float: right;
        margin-top: auto;
        margin-bottom: auto;
        width: 50%;
        padding: 10px;
        text-align: center;
    }
    .img-wrapper {
        overflow: hidden;
        position:absolute;
        top:0;
        left:0;
        width:100%;
        height:100%;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }
    .opacity-layer {
        opacity: 0.5;
        position: absolute;
        top: 0;
        left: 0;
        background: rgb(255, 255, 255);
        height: 100%;
        width: 100%;
        z-index: 1;
        transition: all .280s ease-in;
    }
    .white-half {
        z-index: 2;
        position:absolute;
        top:0;
        left:-50%;
        width:50%;
        height:100%;
        background: white;
        color: black;
        .text-wrapper {
            position: static;
            z-index: 5;
            width: 100%;
            height: 100%;
            top: 0;
            padding-left: 120px;
            padding-right: 120px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            h3 {
                text-transform: uppercase;
                font-weight: 100;
                font-size: 90px;
            }
            .lead-wrap {
                position: relative;
                margin-bottom: 3rem;
                .lead {
                    font-weight: 700;
                    font-size: 2rem;
                    display: inline;
                }
                .line-wrap-large {
                    left: 0;
                    position: absolute;
                    bottom: -24px;
                    width: 100%;
                    .line1 {
                        width: calc(100% - 20px);
                        height: 2px;
                        background: #909090;
                    }
                    .line2 {
                        width: calc(25px);
                        height: 2px;
                        background: #909090;
                        position: absolute;
                        left: -20px;
                        bottom: -9px;
                        transform: rotate(-45deg);
                    }

                }
            }
            .text {
                max-width: 640px;
                font-size: 20px;
                color: #666;
                font-weight: 300;

            }
        }
    }

}
#brand {
    .brand-galery {
        background-image: url("https://podlunsek.com/storage/app/uploads/public/2db/4d5/bd6/thumb__1920_0_0_0_auto.jpg");
    }
}
#technology {
    .technology-gallery {
        background-image: url("https://podlunsek.com/storage/app/uploads/public/143/5af/2a1/thumb__1920_0_0_0_auto.jpg");
    }
}
              
            
!

JS

              
                    gsap.utils.toArray(".panel").forEach((panel, i) => {
        let motiv = panel.querySelector('.img-wrapper'),
            opacity = panel.querySelector('.opacity-layer'),
            text = panel.querySelector('.white-half'),
            line = panel.querySelector('.text-wrapper'),
            heading = panel.querySelector("h3"),
            lead = panel.querySelector('.lead-wrap'),
            besedilo = panel.querySelector('.text');

        gsap.timeline({
                scrollTrigger:{
                    trigger:panel,
                    pin:true,
                    // pinSpacing: false,
                    start:'top top',
                    end:'+=50%',
                    markers: true,
                    scrub: true
                },
                defaults:{duration:1, ease:'none'}
            })
            .to(motiv, {xPercent:50})
            .from(opacity, {opacity:0})
            .to(text, {xPercent:100},0)
            .from(line, {opacity:0, x:'-=100', duration:0.75},0.75)
            .from(heading, {opacity:0, x:'-=150', duration:1},1)
            .from(lead, {opacity:0, x:'-=200', duration:1.5},1.5)
            .from(besedilo, {opacity:0, x:'-=375', duration:1.75},1.75)
            .to({}, {duration:0.3}) // like a pause
    })
              
            
!
999px

Console