Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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

Auto Save

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

              
                #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