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

              
                <!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>

    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
        integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
    <link rel="stylesheet" href="css/style.css">
    <script src="js/anime.min.js" defer></script>
    <script src="js/main.js" defer></script>
</head>
<body>
    <div class="container">
        <button type="button" class="btn btn-success" id="startAnimation">Start</button>
        <div class="line-drawing-demo">
        <svg version="1.1" id="logo" xmlns="http://www.w3.org/2000/svg" x="0" y="0" viewBox="0 0 800 300" xml:space="preserve">
            <g id="head">
                <circle class="st0" cx="172.028" cy="176.62" r="7.873" />
                <path class="st0"
                    d="M204.695 158.653c-1.85-2.643-5.682-8.061-9.911-10.043-4.229-1.982-9.054-1.709-11.629 0s-4.865 4.919-4.757 9.118c.092 3.555 2.43 6.482 5.726 8.564 2.77 1.75 6.891 5.771 7.441 11.18.41-.101.822-.197 1.236-.287 7.116-1.547 14.927-1.129 22.288-.146-3.439-8.466-8.674-15.928-10.394-18.386zm-16.315 1.627c-2.049 0-3.709-1.488-3.709-3.324s1.661-3.324 3.709-3.324c2.049 0 3.709 1.488 3.709 3.324s-1.661 3.324-3.709 3.324z" />
                <path class="st0"
                    d="M196.727 122.224c8.125-4.225 24.701-12.025 27.301-13 2.6-.975 3.9.65 2.275 3.575s-11.05 26.346-12.35 29.576c-3.9-6.501-12.676-17.551-17.226-20.151z" />
                <path class="st0"
                    d="M159.863 148.61c-2.575-1.709-7.4-1.982-11.629 0s-8.061 7.4-9.911 10.043c-1.85 2.643-6.825 10.409-10.365 18.104 8.276-1.289 15.525-1.161 23.702.616.308-4.463 4.31-9.234 7.234-11.081 3.297-2.082 5.635-5.009 5.726-8.564.109-4.199-2.182-7.409-4.757-9.118zm-5.225 11.67c-2.049 0-3.709-1.488-3.709-3.324s1.661-3.324 3.709-3.324c2.049 0 3.709 1.488 3.709 3.324s-1.66 3.324-3.709 3.324z" />
                <path class="st0"
                    d="M147.413 122.307c-8.125-4.225-24.701-12.025-27.301-13s-3.9.65-2.275 3.575 11.05 26.346 12.35 29.576c3.9-6.501 12.676-17.551 17.226-20.151z" />
            </g>
            <path class="st0"
                d="M244.401 136.637l-.076 6.134c1.993-4.371 4.983-6.978 9.2-6.978.768 0 1.612.076 2.302.23l-.921 11.656c-.688-.076-1.303-.154-1.993-.154-6.364 0-7.822 7.592-7.822 15.108v13.112h-12.039v-39.108h11.349z"
                id="text-01" />
            <path class="st0"
                d="M260.886 141.391c3.989-4.295 9.355-5.597 15.643-5.597 11.043 0 16.257 3.988 16.257 15.029v24.923h-10.199l-.076-4.985c-2.837 4.141-6.902 5.982-11.348 5.982-3.682 0-6.595-1.227-8.589-3.068-2.302-2.146-3.451-5.061-3.451-9.048 0-4.754 1.688-7.975 4.831-10.122 3.375-2.302 8.434-3.144 13.648-3.144h4.141v-.997c0-4.295-1.456-5.599-5.751-5.599-3.756 0-6.671.997-9.2 3.451l-5.906-6.825zm16.18 17.637c-4.215 0-6.671.537-6.671 5.061 0 2.454.69 3.912 2.761 3.912 3.221 0 8.282-3.529 8.819-8.972l-4.909-.001z"
                id="text-02" />
            <path class="st0"
                d="M332.203 170.301c-3.76 4.217-8.819 6.212-14.877 6.212-5.751 0-9.663-1.841-12.271-4.678-3.373-3.682-4.6-8.743-4.6-15.184 0-6.365 1.227-12.346 5.214-16.333 2.838-2.761 6.902-4.602 13.038-4.602 4.83 0 9.661 1.151 12.958 4.524l-6.748 8.129c-1.763-1.534-3.834-2.146-6.058-2.146-4.907 0-5.829 2.99-5.829 9.892s.921 10.122 4.909 10.122c2.607 0 5.061-1.303 7.131-3.527l7.133 7.591z"
                id="text-03" />
            <path class="st0"
                d="M368.933 170.301c-3.76 4.217-8.819 6.212-14.877 6.212-5.751 0-9.663-1.841-12.272-4.678-3.373-3.682-4.6-8.743-4.6-15.184 0-6.365 1.227-12.346 5.214-16.333 2.838-2.761 6.902-4.602 13.038-4.602 4.83 0 9.661 1.151 12.958 4.524l-6.748 8.129c-1.763-1.534-3.834-2.146-6.058-2.146-4.907 0-5.829 2.99-5.829 9.892s.921 10.122 4.909 10.122c2.607 0 5.061-1.303 7.131-3.527l7.134 7.591z"
                id="text-04" />
            <path class="st0"
                d="M405.049 172.294c-3.221 3.068-7.287 4.602-13.189 4.602-5.751 0-9.74-1.458-12.73-4.217-3.988-3.604-5.214-8.436-5.214-15.952 0-7.897 1.38-12.729 5.292-16.563 3.22-3.144 7.361-4.755 13.265-4.755 5.675 0 9.816 1.458 12.806 4.219 3.912 3.604 5.137 8.588 5.137 16.104-.001 7.743-1.303 12.652-5.367 16.562zm-8.741-25.382c-.768-.92-1.995-1.38-3.836-1.38-2.222 0-3.603.69-4.295 1.534-1.38 1.61-1.917 5.214-1.917 9.431 0 4.448.614 7.746 1.765 8.972.766.844 2.147 1.38 3.986 1.38 2.072 0 3.375-.69 4.141-1.61 1.38-1.612 1.995-4.909 1.995-9.433 0-4.216-.536-7.36-1.839-8.894z"
                id="text-05" />
            <path class="st0"
                d="M447.991 172.294c-3.221 3.068-7.285 4.602-13.191 4.602-5.751 0-9.737-1.458-12.729-4.217-3.988-3.604-5.214-8.436-5.214-15.952 0-7.897 1.38-12.729 5.29-16.563 3.221-3.144 7.363-4.755 13.267-4.755 5.675 0 9.816 1.458 12.806 4.219 3.91 3.604 5.138 8.588 5.138 16.104.001 7.743-1.303 12.652-5.367 16.562zm-8.743-25.382c-.766-.92-1.993-1.38-3.834-1.38-2.224 0-3.605.69-4.293 1.534-1.38 1.61-1.917 5.214-1.917 9.431 0 4.448.613 7.746 1.762 8.972.768.844 2.148 1.38 3.989 1.38 2.069 0 3.373-.69 4.141-1.61 1.38-1.612 1.993-4.909 1.993-9.433 0-4.216-.536-7.36-1.841-8.894z"
                id="text-06" />
            <path class="st0"
                d="M473.987 136.637v5.98c2.378-4.371 6.289-6.978 11.656-6.978 7.592 0 11.502 5.061 11.502 13.956v26.15h-12.116v-24.232c0-3.144-.613-4.754-2.913-4.754-3.834 0-7.285 4.295-7.285 13.267v15.719h-12.04v-39.108h11.196z"
                id="text-07" />
            <path class="st0"
                d="M514.133 116.545c4.065 0 7.055 3.066 7.055 7.207s-2.99 7.131-7.055 7.131c-3.988 0-7.055-3.066-7.055-7.131 0-4.063 3.067-7.207 7.055-7.207zm6.058 20.092v39.108h-12.04v-39.108h12.04z"
                id="text-08" />
            <path class="st0"
                d="M561.641 170.301c-3.758 4.217-8.819 6.212-14.877 6.212-5.751 0-9.663-1.841-12.27-4.678-3.373-3.682-4.602-8.743-4.602-15.184 0-6.365 1.228-12.346 5.214-16.333 2.838-2.761 6.902-4.602 13.038-4.602 4.831 0 9.663 1.151 12.96 4.524l-6.748 8.129c-1.763-1.534-3.836-2.146-6.058-2.146-4.909 0-5.829 2.99-5.829 9.892s.92 10.122 4.909 10.122c2.606 0 5.059-1.303 7.131-3.527l7.132 7.591z"
                id="text-09" />
            <path class="st0"
                d="M597.757 172.294c-3.22 3.068-7.285 4.602-13.19 4.602-5.751 0-9.739-1.458-12.731-4.217-3.986-3.604-5.214-8.436-5.214-15.952 0-7.897 1.38-12.729 5.292-16.563 3.22-3.144 7.361-4.755 13.267-4.755 5.673 0 9.815 1.458 12.805 4.219 3.912 3.604 5.138 8.588 5.138 16.104.001 7.743-1.303 12.652-5.367 16.562zm-8.741-25.382c-.766-.92-1.995-1.38-3.834-1.38-2.224 0-3.604.69-4.295 1.534-1.38 1.61-1.917 5.214-1.917 9.431 0 4.448.613 7.746 1.763 8.972.766.844 2.146 1.38 3.988 1.38 2.071 0 3.373-.69 4.141-1.61 1.38-1.612 1.993-4.909 1.993-9.433 0-4.216-.536-7.36-1.839-8.894z"
                id="text-10" />
            <g id="tail">
                <path class="st0"
                    d="M646.657 133.291c-9.106-3.406-23.457.155-23.266.3 2.252 1.71 5.97 5.66 4.517 10.488 3.948-4.94 11.471-9.078 18.749-10.788zM630.026 149.406c7.414 4.143 14.179 13.234 14.911 21.471.799 8.987-.35 15.378-2.501 20.183 5.593-.306 11.511-1.327 16.896-2.938 3.222-9.407 2.211-18.311-3.087-26.577-5.371-8.377-16.188-13.883-26.219-12.139z" />
                <path class="st0"
                    d="M682.838 159.787c-.175-6.245-5.482-19.735-14.436-21.745-12.193-2.737-19.37.183-27.68 3.474 12.429 1.526 19.44 6.928 24.251 14.434 5.423 8.46 7.505 17.529 6.265 26.883 7.902-5.295 12.113-14.128 11.6-23.046zM634.61 171.796c-.713-8.025-3.141-16.206-15.407-16.515-2.873 2.279-5.041 5.641-5.475 9.545-.875 7.877.147 15.632 8.811 22.44 1.956 1.537 4.789 2.587 8.146 3.207 3.129-3.618 4.808-8.746 3.925-18.677z" />
            </g>
        </svg>
        </div>
    </div>
</body>
</html>
              
            
!

CSS

              
                
body{
    background-color: #efefef;
    margin: 0;
}

.container{
    width: 100%;
    min-height: 100vh;
    max-width: 1280px;
    margin: 0 auto;
    background-color: #fff;
    padding: 20px;
}

.button{
    width: 30%;
    height: 2rem;
    margin: 0 auto;
}

#logo .st0 
{
    fill: transparent;
    stroke-width: 1px;
    stroke: black;
}
              
            
!

JS

              
                "use strict";

const logo = document.getElementById('logo');
const startAnimation = document.getElementById('startAnimation');


startAnimation.onclick = function(){
    let animation = anime({
        targets: '.st0',
        strokeDashoffset: [anime.setDashoffset, 0],
        easing: 'easeInOutSine',
        duration: 500,
        delay: function (el, i) { return i * 200 },
        direction: 'normal',
        loop: false,
        complete: function (anim) {
            anime({
                targets: '.st0',
                fill: '#000000',
                duration: 15000
            });
        }
    });
};



              
            
!
999px

Console