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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                <span id='preload'></span>
<div class="container-fluid">

    <div class="row">
        <div class="col-sm-2 sidebar">
            <div class='imgContainer'>
                <img src="http://image.ibb.co/j8wUBa/trinity_Logo.png" alt="">
            </div>

            <div class="menu">
                <p id='about' onclick="fn('content')">About</p>
                <p onclick="fn('floor')">Floor Plans</p>
                <p onclick="fn('amenities')">Amenities</p>
                <p onclick="fn('neighborhood')">Neighborhood</p>
                <p onclick="fn('contact')">Contact</p>
                <div id="bar"></div>
                <h3>800-555-5555</h3>
            </div>

        </div>
        <div class="col-sm-10 main">
            <div class="content" id='content'>
                <div class="container-fluid">
                    <div class="row">
                        <h1>Far North Dallas Apartments - Convenient Loction</h1>
                    </div>
                    <div class="row">
                        <div class="col-sm-7">
                            <h3>4000 Tinity Mills Road Dallas, Texas 72587</h3>
                            <p>Lorem ipsum dolor sit amet, in blandit vestibulum enim tempor tincidunt nunc, curabitur sed amet nullam amet. Faucibus quisquam eros, fusce nec turpis senectus commodo, blandit lacinia ipsum vestibulum rutrum ante, voluptates
                                proin faucibus purus. Quis fringilla, dui bibendum imperdiet dui magna dolor sem, porta integer tempor velit quam felis curabitur. Lorem platea imperdiet elementum, sit urna vel, nibh velit. Lacinia donec diam orci congue,
                                porta facilisi sed, id sed porta nostra, sodales risus pede et tincidunt fringilla, pellentesque ac nostra doloremque felis donec.</p>
                            <h3>Six reasons why you should choose our community.</h3>
                            <p>Nulla nec amet duis. Lorem eu, sed vitae laoreet risus orci, dictum ut condimentum magna semper non, amet neque ultricies, dictumst augue nisl praesent ut. Diam lobortis id nulla, at velit nulla sed congue. Nulla ut suspendisse
                                aenean sed ac. Ut pede consectetuer sed lacinia eros arcu, mi nam ligula a justo, mollis lorem dolor vivamus, placerat nulla tellus sit in.</p>
                        </div>
                        <div class="col-sm-5">
                            <form>
                                <h3>Check Availabilty</h3>
                                <p>Fill out the form below.</p>
                                <input type="email" name="email" placeholder="Your email">
                                <input type="email" name="email" placeholder="Name">
                                <input type="email" name="email" placeholder="Phone Number">
                                <input type="email" name="email" placeholder="# of Rooms">
                                <textarea name="message" placeholder="Your message"></textarea>
                                <button class="btn-default" type="submit">Send</button>
                            </form>
                        </div>
                    </div>
                    <div class="row bottom" id='aboutpara'>
                        <p>Mattis nam risus quam, nulla ac vehicula nec vel morbi, vel donec purus pellentesque turpis, aliquam sapien sit in platea, corporis suscipit lacinia nam. Mauris eu, rhoncus vestibulum massa consequat, feugiat suspendisse qui dis
                            pharetra mauris aliquam. Lacinia amet velit fermentum taciti, etiam et, etiam vel nonummy neque dolor. Tellus proin ut aliquam enim, at sit ut quis congue non donec. In aliquam dui aliquam luctus iaculis. Proin nunc imperdiet
                            aenean eros sed nulla, vivamus ligula duis urna metus odio, tincidunt nulla, faucibus ac mauris sollicitudin. Urna ut neque, bibendum proin dui, wisi taciti augue wisi faucibus luctus tortor.</p>
                    </div>
                </div>
            </div>
            <div class="content" id='floor'>
                <h1>Floor Plans</h1>
                <img src="http://www.worthingtonridgeapartment.com/wp-content/uploads/2011/12/WorthingtonApartmentFloorplan.jpg" alt="">
            </div>
            <div class="content" id='amenities'>
                <h1>Amenities</h1>
                <div class="col-sm-6">
                    <ul>
                        <li>In sapien iaculis mi consectetuer praesent amet, ultricies arcu aliquam etiam curabitur, in nullam vestibulum aenean, purus ultricies condimentum donec mauris in.</li>
                        <li>Leo pulvinar aenean sociosqu.</li>
                        <li>Odio aliquam aliquam tincidunt cursus, id enim mus interdum, wisi arcu sit eget.</li>
                        <li>Cras accumsan, amet sit sapien sed, et quam wisi.</li>
                        <li>Quam fermentum sed a, sapien at pellentesque, justo tortor hendrerit, elit proin maecenas tortor in.</li>
                        <li>Wisi mauris vitae amet, euismod leo scelerisque ipsum vestibulum vestibulum, vehicula erat dignissim amet qui in, lectus ut sagittis vel pede scelerisque sodales, et platea eget ante praesent semper nec. </li>
                    </ul>
                </div>
                <div class="col-sm-6">
                    <ul>
                        <li>Porta at pellentesque diam tellus in.</li>
                        <li>Nibh non, vestibulum mauris suspendisse gravida vel pellentesque, eget ipsum mattis a cras cum dolor, pariatur vestibulum id ipsum mauris eget, conubia ante euismod quam et.</li>
                        <li>Habitasse enim urna lacus aliquam lorem, at eget lectus dignissim euismod sed.</li>
                        <li>Auctor non amet sodales, mattis malesuada quis accumsan, vel eget sed interdum ultricies fusce, convallis diam wisi donec.</li>
                        <li>Mollis ultrices ipsum ultricies viverra facilisis, vitae vestibulum tellus, ipsum erat aliquam vel nisl.</li>
                        <li>Scelerisque excepteur ac wisi ut, euismod mauris.</li>
                    </ul>
                </div>
            </div>
            <div class="content" id='neighborhood'>
                <h1>Neighborhood</h1>
                <img src="http://image.ibb.co/hBE4Ev/snazzy_Map.png" alt="">
            </div>
            <div class="content" id='contact'>
                <h1>Contact</h1>
                <div class="col-sm-5">
                    <img src="http://image.ibb.co/hBE4Ev/snazzy_Map.png" alt="">
                    <h1>T Square Apartments</h1>
                    <h1>4000 Trinity Mills Rd.</h1>
                    <h1>Dallas, Tx 72587</h1>
                </div>
                <div class="col-sm-6">
                    <h1>877-888-8888</h1>
                    <p>For future residents</p>
                    <h1>972-333-3333</h1>
                    <p>For current residents</p>
                    <form method="POST">
                        <input type="email" name="email" placeholder="Your email">
                        <textarea name="message" placeholder="Your message"></textarea>
                        <button class="btn-default" type="submit">Send</button>
                    </form>
                </div>
            </div>
            <div class="container-fluid" id='overlay'>
                <div class="row">
                    <div class='mimgContainer'>
                        <img src="http://image.ibb.co/nzJdpv/trinity_Logo_White.png" alt="" class='mImg'>
                    </div>

                </div>
                <div class="row footer">
                    <div class="col-xs-4 number">
                        <p style='color: white'>800-555-5555</p>
                    </div>
                    <div class="col-xs-4 hamburger" onclick='menu()'>
                        <a id="nav-toggle" href="#"><span></span></a>
                    </div>
                    <div class="col-xs-4 mlogo">
                        <img src="http://image.ibb.co/cjKwuv/t_Logo_White.png" alt="">
                    </div>
                    <div class="col-xs-10 fmenu">
                        <p onclick="fn('content')">About</p>
                        <p onclick="fn('floor')">Floor Plans</p>
                        <p onclick="fn('amenities')">Amenities</p>
                        <p onclick="fn('neighborhood')">Neighborhood</p>
                        <p onclick="fn('contact')">Contact</p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
              
            
!

CSS

              
                #preload {
    background: url("http://www.onemissionbay.com/wp-content/uploads/2016/01/gallery15.jpg") no-repeat -9999px -9999px;
    background: url("http://www.onemissionbay.com/wp-content/uploads/2016/01/gallery1.jpg") no-repeat -9999px -9999px;
    background: url("http://www.onemissionbay.com/wp-content/uploads/2016/01/gallery2.jpg") no-repeat -9999px -9999px;
    background: url("http://www.onemissionbay.com/wp-content/uploads/2016/01/gallery6.jpg") no-repeat -9999px -9999px;
    background: url("http://www.onemissionbay.com/wp-content/uploads/2016/01/gallery8.jpg") no-repeat -9999px -9999px;
    background: url("http://www.onemissionbay.com/wp-content/uploads/2016/01/gallery10.jpg") no-repeat -9999px -9999px;
    background: url("http://www.onemissionbay.com/wp-content/uploads/2016/01/gallery11.jpg") no-repeat -9999px -9999px;
    background: url("http://www.onemissionbay.com/wp-content/uploads/2016/01/gallery13.jpg",) no-repeat -9999px -9999px;
    background: url("http://www.onemissionbay.com/wp-content/uploads/2016/01/gallery14.jpg") no-repeat -9999px -9999px;
}

div {
    height: 100vh;
    position: relative;
    text-align: center;
}

li, p {
    color: #A47957;
    transition: .2s;
    list-style: none;
}

li:hover, p:hover {
    color: #D8BD9A;
    transition: .6s;
}

.sidebar {
    background: #04213F;
    display: flex;
    justify-content: center;
}

.sidebar h3 {
    width: 80%;
    margin: 0 auto;
    padding: .5vh;
    background: #A47957;
    color: #04213F;
    transition: .5s;
}

.sidebar h3:hover {
    padding: 0vh;
    background: #04213F;
    color: #A47957;
    border-style: solid;
    border-color: #A47957;
    transition: .3s;
}

.imgContainer {
    width: 100%;
    height: 25vh;
    display: flex;
    justify-content: center;
}

img {
    width: 170%;
}

#bar {
    height: 2px;
    width: 75%;
    margin: 0 auto;
    background: #D8BD9A;
    margin-bottom: 3vh;
}

.menu {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: auto;
    text-align: center;
    margin-bottom: 3vh;
}

.main {
    position: relative;
    background-image: url('http://www.onemissionbay.com/wp-content/uploads/2016/01/gallery15.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    color: white;
    transition: 1.75s;
}

.main p {
    color: white;
}

.content {
    position: absolute;
    height: 100%;
    width: 0%;
    background: rgba(114, 114, 114, 0.6);
    left: 0;
    overflow: hidden;
    transition: .6s;
    overflow: auto;
}

#overlay {
    display: none;
}

.col-sm-7, .col-sm-5 {
    height: auto;
}

.content .row {
    height: auto;
    width: 100%;
}

form {
    width: 100%;
    justify-content: center;
}

form * {
    width: 75%;
    margin-top: 3vh;
}

form h1 {
    text-align: left;
}

#floor img, #neighborhood img, #contact img {
    width: 80%;
}

.content li {
    color: white;
    text-align: left;
    padding-bottom: 7vh;
}

@media only screen and (max-width: 770px) {
    .sidebar {
        display: none;
    }

    #overlay {
        display: initial;
        position: fixed;
        height: 100%;
        top: 0;
        left: 0;
    }

    .footer {
        position: fixed;
        bottom: 0;
        height: 10vh;
        width: 100vw;
        transition: .6s;
    }

    .mimgContainer {
        width: 100vw;
        height: 30vh;
    }

    img {
        width: 75%;
    }
    
    .fmenu p {
        display: inline;
        color: white;
        padding-right: 10px;
    }
    
    .mlogo img {
        width: 9vw;
    }
    
    .hamburger {
            display: flex;
    justify-content: center;
    }
    
    .bottom {
        padding-bottom: 15vh;
    }
    
    #aboutpara {
        padding-top: 5vh;
    }

    #nav-toggle {
        cursor: pointer;
        padding: 10px 35px 16px 0px;
    }
    #nav-toggle span, #nav-toggle span:before, #nav-toggle span:after {
        cursor: pointer;
        border-radius: 1px;
        height: 5px;
        width: 35px;
        background: white;
        position: absolute;
        display: block;
        content: '';
    }
    #nav-toggle span:before {
        top: -10px;
    }
    #nav-toggle span:after {
        bottom: -10px;
    }

    #nav-toggle span, #nav-toggle span:before, #nav-toggle span:after {
        transition: all 500ms ease-in-out;
    }
    #nav-toggle.active span {
        background-color: transparent;
    }
    #nav-toggle.active span:before, #nav-toggle.active span:after {
        top: 0;
    }
    #nav-toggle.active span:before {
        transform: rotate(45deg);
    }
    #nav-toggle.active span:after {
        transform: rotate(-45deg);
    }
}

              
            
!

JS

              
                let arr = [
    "http://www.onemissionbay.com/wp-content/uploads/2016/01/gallery15.jpg",
    "http://www.onemissionbay.com/wp-content/uploads/2016/01/gallery1.jpg",
    "http://www.onemissionbay.com/wp-content/uploads/2016/01/gallery2.jpg",
    "http://www.onemissionbay.com/wp-content/uploads/2016/01/gallery6.jpg",
    "http://www.onemissionbay.com/wp-content/uploads/2016/01/gallery8.jpg",
    "http://www.onemissionbay.com/wp-content/uploads/2016/01/gallery10.jpg",
    "http://www.onemissionbay.com/wp-content/uploads/2016/01/gallery11.jpg",
    "http://www.onemissionbay.com/wp-content/uploads/2016/01/gallery13.jpg",
    "http://www.onemissionbay.com/wp-content/uploads/2016/01/gallery14.jpg"
];

(function loop(i) {
    $(".main").css("background-image", `url(${arr[i]})`);
    if (i < 9) {
        setTimeout(function() {
            loop(++i);
        }, 12000);
    } else {
        loop(0);
    }
})(0);

let opened = null;
let first = true;

function fn(className) {
    if (opened !== null && opened !== className) {
        document.getElementById(opened).style.width = "0";
        openNav(className);
        first = false;
    } else {
        first ? openNav(className) : closeNav(className);
        first = !first;
    }

    if (opened != null) {
        $(".mimgContainer").fadeOut(600);
    } else {
        $(".mimgContainer").fadeIn(600);
    }
}

function openNav(cn) {
    opened = cn;
    document.getElementById(cn).style.width = "100%";
}
function closeNav(cn) {
    opened = null;
    document.getElementById(cn).style.width = "0";
}

function menu() {
    $(".number, .mlogo").hide();
    $(".hamburger").addClass("col-xs-2");
}

let mfirst = true;
function menu() {
    if (opened !== null) {
        closeNav(opened);
        mfirst ? mopenNav() : mcloseNav();
        mfirst = !mfirst;
        console.log(mfirst);
    } else {
        mfirst ? mopenNav() : mcloseNav();
        mfirst = !mfirst;
        console.log(mfirst);
    }
}

function mopenNav() {
    $(".number, .mlogo").hide(600);
    $(".hamburger").addClass("col-xs-2");
    $("#nav-toggle").addClass("active", 600);
}

function mcloseNav() {
    $(".number, .mlogo").show(600);
    $(".hamburger").removeClass("col-xs-2");
    $(".mimgContainer").fadeIn(600);
    $("#nav-toggle").removeClass("active", 600);
}

              
            
!
999px

Console