css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <body>
        <!-- UL Web Ad -->
        <div class="container square-size">
            <section id="webAd" class="web-ad">
                <svg id="ulLogo" class="ul-logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 35 35"><title>ul-logo</title><path d="M35 17.5A17.5 17.5 0 1 1 17.5 0 17.5 17.5 0 0 1 35 17.5M17.5 3.1a14.4 14.4 0 1 0 14.4 14.4A14.4 14.4 0 0 0 17.5 3.1M26.3 24h-3.6V13.3h-3.2V27h6.8v-3zm-9-15.9h-3.1v10.2a1.1 1.1 0 0 1-1 1.2h-.1a1.1 1.1 0 0 1-1.1-1.1V8.2H8.9v10c0 2.5 1.9 3.8 4.2 3.8s4.2-1.3 4.2-3.8v-10z" fill="rgb(255, 255, 255)"/></svg>
                <div class="content">
                    <p id="first">Compliance<br><span class="orange">isn't</span> optional.</p>
                    <p id="second">Don't just<br>comply.<br><span class="orange">Perform.</span></p>
                </div>
            </section>
            <section id="ulMainAd" class="main-ad">
                <div class="content">
                    <svg id="ulLogo" class="ul-logo" xmlns="http://www.w3.org/2000/svg" width="35" height="35" viewBox="0 0 35 35"><title>ul-logo</title><path
                 d="M35 17.5A17.5 17.5 0 1 1 17.5 0 17.5 17.5 0 0 1 35 17.5M17.5 3.1a14.4 14.4 0 1 0 14.4 14.4A14.4 14.4 0 0 0 17.5 3.1M26.3 24h-3.6V13.3h-3.2V27h6.8v-3zm-9-15.9h-3.1v10.2a1.1 1.1 0 0 1-1 1.2h-.1a1.1 1.1 0 0 1-1.1-1.1V8.2H8.9v10c0 2.5 1.9 3.8 4.2 3.8s4.2-1.3 4.2-3.8v-10z" fill="rgb(0, 43, 69)"/></svg>
                    <p>See how UL helps<br>your company move from<br>compliance to performance</p>
                </div>
            <a class="ul-button" href="#"><span>Get your free demo at ullearn.com</span></a>
            </section>
        </div>
        <script src="http://ds.serving-sys.com/BurstingScript/adKit/adkit.js"></script>
        <script src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/1.18.2/TweenMax.min.js"></script>
        <script src="dist/js/compiled.min.js"></script>
</body>
            
          
!
            
              // UL Web Ad

// variables - colors
@ul-color_blue: rgb(0, 43, 69);
@ul-color_orange: rgb(239, 130, 0);
@ul-color_white: rgb(255, 255, 255);
@ul-color_orange-deep: rgb(220, 98, 0);

// base
body {
    font-family: 'Open Sans', sans-serif;
}
a {
    text-decoration: none;
}
p, li {
    margin: 0 0 1.25em 0;
    text-align: left;
    font-size: 105%;
    line-height: 1em;
}
section {
    height: 100%;
    width: 100%;
}

// classes
.square-size {
    width: 298px;
    height: 248px;
    border: 1px solid rgb(100, 100, 100);
    cursor: pointer;
}
.web-ad, .main-ad {
    display: flex;
    flex-flow: column;
}
.content {
    display: flex;
    flex-flow: column;
}

#webAd {
    position: relative;
    opacity: 0;
    &.web-ad {
        background: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 301.6 176.1'%3E%3Ctitle%3Eweb%3C/title%3E%3Cg opacity='.5' fill='none' stroke='%23fff' stroke-miterlimit='10' stroke-width='.5'%3E%3Cpath d='M.2 133.1l37.3-44.8 33 11.5 38.8 13.3 37-7.8 38.5-10.5L249 56.1l29.8-50.8 22-5.1'/%3E%3Cpath d='M13.8 161.3l34-23.2 21.5-5.3 74 .8 74.2-15.5 68-28.8-4.7-35.2 20-6M52.3 167.3l113.5-4.2 49.5-3.3 35.2-26.7 18.8 17 31.5-29.9M36.9 88.2l11.9 49.1M70.5 99.8l-1.1 33.9'/%3E%3Cpath d='M218.7 118.9l-33.5-24.3-41.9 39-34.8-20.5M14.3 162.6l38.7 5 16.3-34.8'/%3E%3Cpath d='M165.8 163.3l52.7-44.7 30-62.8 31.8-1.5L279 5.8M146.3 105.1l-3 28.2M165.3 163.1L143 133.3M53 167.3l91-33.7M218 118.6l-2.5 41.5M218.5 118.8l31.8 14.5M285.8 88.1l-17 61.5M247.3 55.6l38.2 32.2M48.3 137.3l4.2 30.3M69.5 133.3L14 162.1v13.7M14.5 161.3L.8 148.1M70 99.3l72.5 33.8M145.5 104.6l72.3 14M184.5 94.1l101-6M249.8 132.6l36.2-44M52.9 167.2v8.6M165.5 163.6l20.3 12.2M215.9 160.6l10.8 15.2M269.2 149.2l20.5 26.6M280.5 54.2l20.9-30.1M285.5 87.9l15.3 9.5M268.9 148.9l32.5-68.7M215.2 159.6l85.6 8.3'/%3E%3C/g%3E%3Cpath d='M285.6 88.7z' fill='%23fff'/%3E%3Ccircle cx='269.7' cy='176.3' r='3.5' transform='rotate(-7.4 -671.977 281.867)' fill='%23ffd74f'/%3E%3Ccircle cx='239.9' cy='238.5' r='3.5' transform='rotate(-7.4 -702.415 344.342)' fill='%23ee3c46'/%3E%3Ccircle cx='187.6' cy='283.5' r='3.5' transform='rotate(-8.11 -751.4 376.2)' fill='%23f68f1e'/%3E%3Ccircle cx='206.6' cy='215' r='3.5' transform='rotate(-7.4 -735.03 320.49)' fill='%238c57a2'/%3E%3Ccircle cx='130.4' cy='233.3' r='2.2' transform='rotate(-7.4 -811.53 338.84)' fill='%238c57a2'/%3E%3Ccircle cx='91.1' cy='253.6' r='2.2' transform='rotate(-7.4 -850.92 359.58)' fill='%23ffd74f'/%3E%3Ccircle cx='165.1' cy='253.7' r='2.2' transform='rotate(-7.4 -777.17 359.69)' fill='%23ffd74f'/%3E%3Ccircle cx='300.6' cy='126.2' r='2.2' transform='rotate(-7.4 -641.57 231.81)' fill='%23ee3c46'/%3E%3Ccircle cx='237.3' cy='280.4' r='2.2' transform='rotate(-30.5 5.71 259.47)' fill='%23f68f1e'/%3E%3Ccircle cx='168' cy='225.8' r='2.2' transform='rotate(-30.5 -63.74 204.87)' fill='%23f68f1e'/%3E%3Ccircle cx='58.8' cy='208.6' r='2.2' transform='rotate(-30.5 -172.94 187.71)' fill='%23ffd74f'/%3E%3Ccircle cx='92.1' cy='220.2' r='2.2' transform='rotate(-30.5 -139.48 199.39)' fill='%238c57a2'/%3E%3Ccircle cx='70.2' cy='258' r='2.2' transform='rotate(-21.5 -257.81 254.19)' fill='%23f68f1e'/%3E%3Ccircle cx='307.1' cy='209' r='2.2' transform='rotate(-21.5 -21.23 205.25)' fill='%23ee3c46'/%3E%3Ccircle cx='271.6' cy='253.6' r='2.2' transform='rotate(-21.5 -56.7 249.81)' fill='%23ffd74f'/%3E%3Ccircle cx='302.2' cy='174.9' r='2.2' transform='rotate(-21.5 -25.93 171.07)' fill='%238c57a2'/%3E%3Ccircle cx='291' cy='269.3' r='5' transform='rotate(-7.4 -650.82 374.85)' fill='%23f68f1e'/%3E%3Ccircle cx='36.7' cy='283.1' r='5' transform='rotate(-7.4 -905.6 388.66)' fill='%23ffd74f'/%3E%3Ccircle cx='75.2' cy='287.5' r='5' transform='rotate(-7.4 -867.09 393.48)' fill='%23ee3c46'/%3E%3C/svg%3E") no-repeat 1px 106px @ul-color_blue;
        .ul-logo {
            position: absolute;
            right: 1px;
            width: 12%;
            height: 14%;
            margin: 0.75em 0.75em 0 0;
        }
        .content {
            padding: 0;
            margin: 3.5em 0 0 1.5em;
            p {
                font-size: 170%;
                line-height: 1.15em;
                color: @ul-color_white;
                .orange {
                    color: @ul-color_orange;
                }
            }
        }
    }
}


#ulMainAd {
    opacity: 0;
    &.main-ad {
        .content {
            height: 183px;
            .ul-logo {
                width: 30%;
                height: 32%;
                margin: 1.7em 0 1em 0;
                align-self: center;
            }
            p {
                font-size: 110%;
                color: @ul-color_blue;
                line-height: 20px;
                text-align: center;
            }
        }
        .ul-button {
            font-size: 0.85rem;
            color: @ul-color_white;
            align-self: flex-end;
            text-align: center;
            padding: 1.75em 0;
            background: @ul-color_orange;
            transition: background-color 0.4s ease;
            width: 100%;
            &:hover {
                background-color: @ul-color_orange-deep;
            }
            &:after {
                content: "";
                width: 2em;
                height: 1em;
                margin: 0.2em 0 -0.15em 0.75em;
                display: inline-block;
                background: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 25.1 14.5'%3E%3Ctitle%3Eul_icon_right-arrow%3C/title%3E%3Cpath fill='none' stroke='%23fff' stroke-miterlimit='10' d='M24.8 7.5l-6.7 6.6M17.7.4l7.1 7.1M24.8 7.5H0'/%3E%3C/svg%3E") no-repeat;
            }
        }
    }
}

            
          
!
            
              // UL Web Ad
(function($) {

    // on click of section tag, redirect to url
    $('section').click(function() {
      window.open('https://www.google.com');
    });

    var ad = $('#webAd'),
        logo = ad.find('#ulLogo'),
        firstP = ad.find('#first'),
        secondP = ad.find('#second'),
        mainAd = $('#ulMainAd'),
        tl = new TimelineMax({repeat: -1});

    tl
        .to(ad, 0.5, {autoAlpha: 1, delay: 0.75})
        .from(logo, 0.5, {autoAlpha: 0, y: 30, ease:Power1.easeOut, delay: 0.5})
        .from(firstP, 0.5, {autoAlpha: 0, y: 30, ease:Power1.easeOut, delay: 0.75})
        .from(firstP.find('.orange'), 0.25, {autoAlpha: 0, y: 30, ease:Power1.easeOut, delay: 0.75})
        .to(firstP, 0.5, {autoAlpha: 0, display:'none', y: 30, delay: 1})
        .from(secondP, 0.5, {autoAlpha: 0, y: 30, ease:Power1.easeOut, delay: 0.75})
        .from(secondP.find('.orange'), 0.25, {autoAlpha: 0, y: 30, ease:Power1.easeOut, delay: 0.75})
        .to(secondP, 0.5, {autoAlpha: 0, y: 30, ease:Power1.easeOut, delay: 1})
        .to(ad, 0.5, {autoAlpha: 0, display:'none', ease:Power1.easeOut, delay: 1})
        .to(mainAd, 0.5, {autoAlpha: 1, delay: 0.75})
        .to(mainAd, 0.5, {autoAlpha: 0, delay: 6});

})(jQuery);
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console