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

              
                <!DOCTYPE html>

<html>

    <head>

        <title>Motionia.js Animating the door!</title>

         <meta name="viewport" content="width=device-width, initial-scale=1.0"> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

           <script src="https://cdn.jsdelivr.net/gh/abhiprojectz/motionia@v1.0/dist/motionia.js"></script>

           <link href="./css/motionia.css" rel="stylesheet"></link>

      

    </head>

    <body>

    <div id="loader">

          

          <div id="space">

              <p style="text-align:center;font-family:Passion one;font-size:22px;color:#fff;">Loading!</p>

          </div>

          <svg width="44" height="44" viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg" stroke="#fff">

<g fill="none" fill-rule="evenodd" stroke-width="2">

<circle cx="22" cy="22" r="19.4407">

<animate attributeName="r" begin="0s" dur="1.8s" values="1; 20" calcMode="spline" keyTimes="0; 1" keySplines="0.165, 0.84, 0.44, 1" repeatCount="indefinite"></animate>

<animate attributeName="stroke-opacity" begin="0s" dur="1.8s" values="1; 0" calcMode="spline" keyTimes="0; 1" keySplines="0.3, 0.61, 0.355, 1" repeatCount="indefinite"></animate>

</circle>

<circle cx="22" cy="22" r="11.526">

<animate attributeName="r" begin="-0.9s" dur="1.8s" values="1; 20" calcMode="spline" keyTimes="0; 1" keySplines="0.165, 0.84, 0.44, 1" repeatCount="indefinite"></animate>

<animate attributeName="stroke-opacity" begin="-0.9s" dur="1.8s" values="1; 0" calcMode="spline" keyTimes="0; 1" keySplines="0.3, 0.61, 0.355, 1" repeatCount="indefinite"></animate>

</circle>

</g>

</svg>

        

      </div>

      

      

      <div id="super"/>

      

      <div id="meenu">

      <a class="links" href="https://abhiprojectz.github.io">Home</a>

      <br />

      <br />

          <a class="links" href="https://github.com/abhiprojectz">My github</a>

          <a class="links" href="https://github.com/abhiprojectz/motionia">Motionia on github!</a>

          <br />

      </div>

    

    

     <div class="header">

            <span><svg width="55" fill="#730FF6" height="55" viewBox="0 0 24 24"> <path d="M12,8L10.67,8.09C9.81,7.07 7.4,4.5 5,4.5C5,4.5 3.03,7.46 4.96,11.41C4.41,12.24 4.07,12.67 4,13.66L2.07,13.95L2.28,14.93L4.04,14.67L4.18,15.38L2.61,16.32L3.08,17.21L4.53,16.32C5.68,18.76 8.59,20 12,20C15.41,20 18.32,18.76 19.47,16.32L20.92,17.21L21.39,16.32L19.82,15.38L19.96,14.67L21.72,14.93L21.93,13.95L20,13.66C19.93,12.67 19.59,12.24 19.04,11.41C20.97,7.46 19,4.5 19,4.5C16.6,4.5 14.19,7.07 13.33,8.09L12,8M9,11A1,1 0 0,1 10,12A1,1 0 0,1 9,13A1,1 0 0,1 8,12A1,1 0 0,1 9,11M15,11A1,1 0 0,1 16,12A1,1 0 0,1 15,13A1,1 0 0,1 14,12A1,1 0 0,1 15,11M11,14H13L12.3,15.39C12.5,16.03 13.06,16.5 13.75,16.5A1.5,1.5 0 0,0 15.25,15H15.75A2,2 0 0,1 13.75,17C13,17 12.35,16.59 12,16V16H12C11.65,16.59 11,17 10.25,17A2,2 0 0,1 8.25,15H8.75A1.5,1.5 0 0,0 10.25,16.5C10.94,16.5 11.5,16.03 11.7,15.39L11,14Z" /> </svg></span>

            

        

            

            <span><svg class="right" fill="#730FF6" width="35" height="35" viewBox="0 0 24 24"> <path d="M16,12A2,2 0 0,1 18,10A2,2 0 0,1 20,12A2,2 0 0,1 18,14A2,2 0 0,1 16,12M10,12A2,2 0 0,1 12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12M4,12A2,2 0 0,1 6,10A2,2 0 0,1 8,12A2,2 0 0,1 6,14A2,2 0 0,1 4,12Z" /> </svg></span>

        </div>

        

        <p id="aa" ><strong>Motionia </strong> - lightweight simplified readymade animation library!</p>

<p id="aa"> With motionia you can animate elements quickly by just one line of code!!!</p>

        

        

    <div id="container">

    

        

        

        <div id="box"><img src="https://raw.githubusercontent.com/abhiprojectz/motionia/master/assest/unnamed.png"></div>

        

        

        <h1>Animating the <strong>Door!</strong></h1>

        

         <div id="out" class="collection">

          <span>doorUp</span>

           <span>doorDown</span>

            <span>doorLeft</span>

             <span>doorRight</span> 

             <span>swingIn</span>

              <span>swingDown</span>

            <span>swingRight</span>

             <span>swingLeft</span>

           

        </div>

 

        <p id="code">Code: motionia("#door","anim-name")</p>

        

        <br /><br />

        

        </div>

         

        <div id="about">

        

        <h7>About motionia!</h7>

        <p>Motionia has a lot of potential to create anims easily, by just one line of code.</p>

        

   <p>The Docs will be available soon!</p>

        <a href="https://github.com/abhiprojectz/motionia">Grab the docs on github!</a>

        

        <p>The abhiprojectz work.</p>

     

        <div id="footer">

           

            <a href="https://github.com/abhiprojectz">Abhi on github!</a>

            <p>© abhiprojectz || 2020</p>

            </div>

        </div>

    </body>

      

     <script>

    $("#super").hide();

    

        setTimeout(loader, 3000);

      

      

      function loader() {

          

          $("#loader").slideUp();

          $("#super").slideUp();

          $("#super").show();

          motionia(".header span","bounceIn")

      }

      

    </script>

    

    <script>

        

        $("#in span").click(function (){

            

            var type = $(this).html();

            

            motionia("#box",type)

            

        })

         $("#out span").click(function (){

            

            var type = $(this).html();

            

            motionia("#box",type)

            

        })

        

        

        function code(data) {

            

            var t = data.substr(30);

            

            $("#code").html("Your Output: " + t)

            motionia("#code","slitIn");

        }

        

        

        $(".right").click(function () {

              

              

            $("#meenu").slideDown();

       

            

        })

    </script>

    

    

</html>
              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css?family=Raleway:400,400i,700");

@import url("https://fonts.googleapis.com/css?family=Merriweather:400,400i,700");

body {

        font-family: Raleway, sans-serif;

        width:100%;

        height:100vh;

        margin:0;

        color:#fff;

    

}

.header {

    

    width:100%;

    display:flex;

}

.links {

    

    color:#730FF6;

    width:50%;

    text-align:center;

    margin:auto;

    outline:1px solid #730FF6;

    margin-top:15px;

    padding:10px;

}

.links:hover {

    

    background-color:#730FF6;

    color:#fff;

    font-weight:900;

    

}

.header span {

    

    width:50%;

    margin:auto;

    display:flex;

}

.right {

    

    right:0;

    margin-right:0;

    margin-left:auto;

}

.collection {

    

    width:100%;

    height:30vh;

    display:flex;

    overflow-x:scroll;

    overflow-y:none;

}

.collection > span {

    

    width:40px;

    height:30px;

    padding:40px;

    background:#fff;

    text-align:center;

    color:#000;

    border-radius:15px;

    display:flex;

    align-items:center;

    margin:auto;

    margin-right:10px;

    margin-left:10px;

    box-shadow: 0 10px 6px -6px #777;

}

#container {

    width:100%;

        background-color: #000000;

background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='30' viewBox='0 0 1000 120'%3E%3Cg fill='none' stroke='%23222' stroke-width='10' %3E%3Cpath d='M-500 75c0 0 125-30 250-30S0 75 0 75s125 30 250 30s250-30 250-30s125-30 250-30s250 30 250 30s125 30 250 30s250-30 250-30'/%3E%3Cpath d='M-500 45c0 0 125-30 250-30S0 45 0 45s125 30 250 30s250-30 250-30s125-30 250-30s250 30 250 30s125 30 250 30s250-30 250-30'/%3E%3Cpath d='M-500 105c0 0 125-30 250-30S0 105 0 105s125 30 250 30s250-30 250-30s125-30 250-30s250 30 250 30s125 30 250 30s250-30 250-30'/%3E%3Cpath d='M-500 15c0 0 125-30 250-30S0 15 0 15s125 30 250 30s250-30 250-30s125-30 250-30s250 30 250 30s125 30 250 30s250-30 250-30'/%3E%3Cpath d='M-500-15c0 0 125-30 250-30S0-15 0-15s125 30 250 30s250-30 250-30s125-30 250-30s250 30 250 30s125 30 250 30s250-30 250-30'/%3E%3Cpath d='M-500 135c0 0 125-30 250-30S0 135 0 135s125 30 250 30s250-30 250-30s125-30 250-30s250 30 250 30s125 30 250 30s250-30 250-30'/%3E%3C/g%3E%3C/svg%3E");

}

h1 {

    

    color:#fff;

    

}

.tag {

    

    border-bottom:1px solid #730FF6 ;

}

#code {

    

    width:90%;

    background:#fff;

    padding:15px;

    color:#730FF6;

    border-radius:15px;

    margin:auto;

    margin-bottom:50px;

}

#super {

    

    display:none;

}

#space {

    

    width:100%;

    height:100px;

}

#loader {

    height:100vh;

    width:100%;

    color:#000;

    margin:0;

    font-weight:600;

    text-align:center;

    background-color:#730FF6;

    flex-direction:column;

    display:flex;

}

#loader svg {

    

    width:80%;

    display:block;

    height:80vh;

    margin:auto;

}

#aa {

    

    color:#730FF6;

}

#footer {

    

    width:100%;

    height:60px;

    color:#AC92EC;

    background:#967ADC;

    display:flex;

    font-size:18px;

    

}

#footer p,a {

    

    margin:auto;

    display:block;

    font-weight:900;

}

a {

    color:#fff;

    border-bottom:2px solid #000;

    text-decoration:none;

}

#about {

    

    border-radius:15px 15px 0 0;

    background:#730FF6;

    width:100%;

    color:#fff;

}

#about h7 {

    

    font-size:18px;

    margin-left:5px;

    margin-bottom:20px;

}

#about p {

    

    margin-left:5px;

}

#meenu {

    

    width:100%;

    display:none;

    margin:0;

    flex-direction:column;

}

#box {

    width:90%;

    margin:auto;

}

#box img {

    

    width:100%;

    

    

}


              
            
!

JS

              
                
              
            
!
999px

Console