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.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

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.

HTML

            
              #app
   .notification= "notification"
   .pop
     .cl
       i.fas.fa-times
     .message= "Lorem Ipsum"
            
          
!

CSS

            
              @import url('https://fonts.googleapis.com/css?family=Comfortaa:300,400,700')
body
    margin: 0
    padding: 0
    font-family: 'Comfortaa', cursive
    overflow: hidden

#app
    position: relative
    width: 100vw
    height: 100vh
    display: flex
    justify-content: center
    align-items: center
    overflow: hidden
    .notification
        position: absolute
        border: 1px solid #F38181
        padding: 1.3em
        font-size: 1.4em
        font-weight: 300
        text-transform: uppercase
        letter-spacing: 5px
        cursor: pointer
        color: #F38181
        box-shadow: 0 1px 18px rgba(0,0,0,.10)
        transition: all .3s ease-in
        &:hover
            color: #FFF
            background: #F38181
    .pop
        position: absolute
        top: 50px
        right: 0
        width: 300px
        height: 80px
        box-shadow: 0 0 1px rgba(0,0,0,.15), 0 2px 18px rgba(0,0,0,.15)
        display: none
        justify-content: space-between
        align-items: center
        .cl
            padding: 0 30px
            height: 100%
            background-color: #FCE36A
            border-right: 2px solid rgba(255,255,255,.6)
            color: #F38181
            font-size: 2em
            display: flex
            justify-content: center
            align-items: center
            cursor: pointer
        .message
            background: linear-gradient(to right, #FCE36A, #F38181)
            flex: 1
            height: 100%
            display: flex
            justify-content: center
            align-items: center
            color: #FFF
            font-size: 1.2em
            padding: 0 5px
            text-transform: uppercase

        


            
          
!

JS

            
              $(function() {
    let $notifi = $('.notification'),
        $pop = $('.pop'),
        $cl = $('.cl');

    $notifi.hover(function() {
        TweenMax.fromTo($notifi,0.10, {x:-100},{x:100, repeat:5,yoyo:true,ease:Sine.easeInOut,onComplete:function(){TweenMax.to(this.target,1,{x:0,ease:Elastic.easeOut})}})
    })

    $notifi.click(function() {
        TweenMax.fromTo($pop, 0.5, {x: 300}, {display: "flex", x: -10, yoyo:true, ease: Bounce.easeOut } )
    })

    $cl.click(function() {
        TweenMax.to($pop, 0.5,{display: "none", x: 310, yoyo:true, ease: Bounce.easeOut } )
    })

})
            
          
!
999px

Console