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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="assets/scroll.css">


</head>

<body onload="loader()" id="body">
    <div id="Loader">
        <img class="loading_image" style="text-align: center" src="assets/images/Group_1@2x.png" alt="Loader" />
    </div>
    <div class="header">
        <img class="logo" src="https://itskhagendra.github.io/NYX/assets/images/Logo_placeholder@300x-8.png" alt="logo" />
    </div>
    <div class="Wrapper" id="pin_slides">
        <div id="slides_container">
            <div class=" slides_panel" id="about" style="background: none">
                <div class="contents one">
                    <div class="mission">
                        <h1>Mission</h1>
                        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
                            labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
                            laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in
                            voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat
                            cupidatat
                            non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
                    </div>
                    <div class="about">
                        <h1>About</h1>
                        <h1>us</h1>
                    </div>
                    <div class="vision">
                        <h1>Vision</h1>
                        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
                            labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
                            laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in
                            voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat
                            cupidatat
                            non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
                    </div>
                </div>
            </div>
            <div class="slides_panel" id="services">
                <div class="service_contents">
                    <div class="service">
                        <h1>Services</h1>
                    </div>
                    <div class="services slider">
                        <div class="s1"></div>
                        <div class="s1"></div>
                        <div class="s1"></div>
                        <div class="s1"></div>
                        <div class="s1"></div>
                        <div class="s1"></div>
                    </div>
                </div>
            </div>
            <div class="slides_panel" id="portfolio">
                <div class="portfolio_contents">
                    <div class="portfolio">
                        <h1 id="portfolioText" >Portfolio</h1>
                    </div>
                    <div class="portfolio_contents">

                    </div>
                </div>
            </div>
            <div class="slides_panel" id="contact">
                <div class="contact_holder">
                    <div class="left_holder"></div>
                    <div class="contact">
                        <form>
                            <h1>Contact us</h1>
                            <div>
                                <input type="text" name="Name">
                            </div>
                            <div>
                                <input type="email" name="email">
                            </div>
                            <div>
                                <input type="text" name="subject">
                            </div>
                            <div>
                                <textarea rows="7" name="message">
                                        </textarea>
                            </div>
                            <div class="submit">
                                <h2>Submit</h2>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <div class="navigation">
            <nav class="nav">
                <ul>
                    <li><a href="#about">About Us</a></li>
                    <li><a href="#services">services</a></li>
                    <li><a href="#portfolio">portfolio</a></li>
                    <li><a href="#contact">contact us</a></li>
                </ul>
            </nav>
        </div>
    </div>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.1.3/TweenMax.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.1.3/TimelineMax.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.1.3/plugins/CSSRulePlugin.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/ScrollMagic/2.0.7/ScrollMagic.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/ScrollMagic/2.0.2/plugins/animation.gsap.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/ScrollMagic/2.0.2/plugins/debug.addIndicators.min.js"></script>
    <script src="assets/magic.js" defer></script>
</body>

</html>
              
            
!

CSS

              
                body {
    margin: 0;
    background: rgb(6, 6, 10);
    overflow: hidden;
}

.header {

    .logo {
        z-index: 10;
        position: absolute;
        position: fixed;
        height: auto;
        width: 200px;
        margin-left: 50px;
    }
}

.hide-trans {
    transform: scale(8, 8);
    transition: 7s;
    overflow: hidden;

}
#Loader
{
    position: absolute;
    z-index: 100;
    width:100%;
    height: 100%;
    //display: block;
}

.loading_image {
    z-index: 100;
    width:100%;
    height: 100%;
    text-align: center;
}

.hide {
    display: none;
}

#pin_slides {
    z-index: 10;
    overflow: hidden;
    width: 99vw;
    height: 99vh;
    overflow: hidden;
}

#slides_container {
    overflow: hidden;
    position: absolute;
    width: 400%;
    height: 100vh;
    

}

.slides_panel {
    overflow: hidden;
    height: 100vh;
    width: 25%;
    float: left;
    z-index: -1;
    background-image: url('https://itskhagendra.github.io/NYX/assets/images/Mountains@300x-8.png');
    background-size:140%;
    background-repeat:no-repeat;
    background-position:bottom;  
}
#about 
{
    .slides_panel
    {
        background-image: none !important;
    }
}
.one::before
{   
    
        position: absolute;
        background-image:url('https://itskhagendra.github.io/NYX/assets/images/Main_rock@300x-8.png');
        width: 100%;
        height: 80%;
        z-index: -1;
        background-size:140vw;
        bottom:-1vw;
        background-repeat:no-repeat;
        //background-position:left;
        //background-position-y: 200px; 
        content: "";
}


h1 {
    text-transform: uppercase;
    background-color: #0a0a0a;
    font-size: 3em;
    color: transparent;
    text-shadow: 2px 2px 3px rgba(65, 65, 65, 0.55);
    -webkit-background-clip: text;
    background-clip: text;
    
}
.contents {
    margin-top: 60vh;
    // bottom: +10vw;;
    display: flex;
    width: 100vw;
    z-index: 500;
    align-items: flex-end;


    .mission {
        padding-left: 2vw;
        width: 30%
    }

    .about {
        h1 {
            margin: 0;
            font-size: 6.5em;
        }

        text-align: center;
        width:35%
    }

    .vision {
        width: 30%;
    }
}

.navigation
{
    
    z-index: 5;
    position: absolute;
    background-image: url('https://itskhagendra.github.io/NYX/assets/images/Grass@300x-8.png');
    background-size: 100%;
    background-repeat:no-repeat;
    bottom:0vw;
    height: 9vw;
    width: 100%; 

    
}
nav {
    display: flex;
    position: absolute;
    bottom: 0;
    margin: 0 2vw;
    text-transform: uppercase;
    justify-content: space-between;

    ul {
        display: flex;
        justify-content: space-evenly;
        margin: 0;
        background-image: url('https://itskhagendra.github.io/NYX/assets/images/Menu_Holder@300x-8.png');
        background-size:55%; 
        background-position:bottom; 
        background-repeat:no-repeat; 
        padding:1.5vw 20vw;
        width: 50vw; 
       
        list-style: none;
        a
        {
            text-decoration: none;
        }
        a>li {
            cursor: pointer;
            text-align: center;
            color: black;
            font-weight:700; 
            text-decoration: none;
        }
    }

}
.service_contents
{
    display: flex;
    margin-top: 40vh;
    .service
    {
        margin-right: 20vw;
        text-align: left;
        width: 50%;
        h1
        {
            margin-top:15vw !important;
        }
    }
    .services
    {
        width: 50%;
        z-index: 5;
        display: flex;
        flex-flow: wrap;
        
    }
    .services::before
    {
        position: absolute;
        background-image:url('https://itskhagendra.github.io/NYX/assets/images/Portfolio_Rock@300x-8.png');
        width: 40%;
        height: 100%;
        z-index: 0;
        margin-left: -25vw;
        background-size:120vw;
        bottom:-1vw;
        background-repeat:no-repeat;
        background-position:bottom;
        //background-position-y: 200px; 
        content: "";
    }
    .s1
    {
        background: url('https://itskhagendra.github.io/NYX/assets/images/Client_Desc@300x-8.png');
        background-size:60%;
        background-repeat:no-repeat;
        padding: 7% 1%; 
        z-index: 100;
        background-position:center;   
        width: 30%;
        height: 100px;

    }
}
.portfolio_contents
{
    display: flex;
    margin-top: 40vh;
    z-index: 10;
    .portfolio
    {
        margin-right: 20vw;
        text-align: left;
        z-index: 10;
        width: 50%;
        h1
        {
            z-index: 10;
            margin-top:15vw !important;
            margin-left: 5vw;
            //color: red;
        }
    }
    .portfolio_contents
    {
        width: 50%;
        height: 100%;
    }
    .portfolio_contents::before
    {
        position: absolute;
        background-image:url('https://itskhagendra.github.io/NYX/assets/images/Cave@300x-8.png');
        width: 40%;
        height: 100%;
        z-index: 0;
        margin-left: -25vw;
        background-size:100%;
        bottom:-1vw;
        background-repeat:no-repeat;
        background-position:bottom;
        //background-position-y: 200px; 
        content: "";
    }
}

.contact_holder {
    display: flex;

    .left_holder {
        width: 50%;
    }
    .contact {
        width: 50%;
        margin-top: 10vh;
        padding-right: 5vw;
        margin: 0%;
        background: url('https://itskhagendra.github.io/NYX/assets/images/Contact_Us_Stone@300x-8.png');
        background-size: 60%;
        background-position: center;
        background-repeat: no-repeat;
    
        form {
            width: 100%;
            height: 100vh;
            margin-right: 10vw;
            text-align: center;
    
            h1 {
                text-align: center !important;
                padding-top: 20vh;
                padding-left: 2vw;
                text-align: center;
            }
    
            input {
                background: transparent;
                width: 20vw;
                border: 0;
                color: white;
                font-size: 1.3em;
                border-bottom: 1px red solid;
                height: 3.5vh;
                margin: 10px 1vw 30px 5vw;
            }
    
            textarea {
                background: transparent;
                width: 20vw;
                border: 0;
                border-bottom: 1px red solid;
                margin: 10px 1vw 25px 5vw;
            }
    
            .submit {
                background-image: url('https://itskhagendra.github.io/NYX/assets/images/Stone\ button@300x-8.png');
                background-repeat: no-repeat;
                background-position: center;
                background-size: 20%;
    
                h2 {
                    color: black;
                    padding: 1vw 0;
                }
            }
    
    
        }
    
    
    }
}


              
            
!

JS

              
                function loader() {
    // window.alert('hi');
    var loader = document.getElementById('Loader');

    loader.classList.add('hide-trans');

    setTimeout(remove_loader, 4000)
}

function remove_loader() {
    var loader = document.getElementById('Loader');
    loader.classList.add('hide');
    var body = document.getElementById('body');
    body.style.overflowY = 'scroll';
}


var controller = new ScrollMagic.Controller();

var wipeAnimation = new TimelineMax()
    .to('#slides_container', 1, {
        x: "-25%"
    })
    .to('#slides_container', 1, {
        x: "-50%"
    })
    .to('#slides_container', 1, {
        x: "-75%"
    })


var portfolioAnimation = new TimelineMax()
    .to('#portfolioText', 5, {
        x: -50,
        opacity: 1,
    }, "10")



const scene1 = new ScrollMagic.Scene({
        triggerElement: '#pin_slides',
        triggerHook: 'onLeave',
        duration: '500%'
    })
    .setPin('#pin_slides')
    .setTween(wipeAnimation)
    .addTo(controller);

const scene2 = new ScrollMagic.Scene({
        triggerElement: '#portfolioText',
        triggerHook: 'onEnter',
    })
    .setPin('.portfolio_contents')
    .setTween(portfolioAnimation)
    .addIndicators()
    .addTo(controller)

/*const scene3 = new ScrollMagic.Scene({
        triggerElement: '.slides_panel',
    })
    .setTween(beforeAnimation)
    .addTo(controller)
    */
              
            
!
999px

Console