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

              
                <div class="container">
    <div class="progress">0/5 COMPLETED.</div>
    <div class="group dua">
        <input placeholder="Name" required/><div class="button"></div>
    </div><div class="group tiga">
        <input placeholder="Business Email" type="email" required/><div class="button"></div>
    </div><div class="group tiga">
        <input placeholder="Job Position" required /><div class="button"></div>
    </div><div class="group tiga">
        <input placeholder="Company" required /><div class="button"></div>
    </div><div class="group tiga">
        <input placeholder="Country" required /><div class="button"></div>
    </div><div class="group tiga"><div class="download">DOWNLOAD WHITEPAPER ›</div></div>
</div>
              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css?family=Roboto+Slab:200");

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border: 0;
    transform-style: preserve-3d;
    font-family: "Roboto Slab", sans-serif;
}

*:focus {
    outline: 0;
}

body {
    background: #816bbf;
}

.container,
input,
.button,
.group,
.button:after,
.download {
    height: 60px;
}

.container,
.group {
    width: 360px;
}

.container {
    margin: calc(50vh - 30px) 0 0 calc(50vw - 180px);
    perspective: 500px;
}

.group,
.button:after {
    position: absolute;
    top: 0;
    left: 0;
}

input,
.button {
    display: inline-block;
    vertical-align: top;
}

input {
    width: 300px;
    background: white;
    padding: 20px;
    font-size: 18px;
    color: #212121;
}

input::placeholder {
    color: silver;
}

.button,
.button:after {
    width: 60px;
}

.button,
.download {
    cursor: pointer;
    background: #E0E0E0;
    transition: background 0.5s;
}

.button.valid,
.download {
    background-image: linear-gradient(135deg, #4bf3dd 10%, #4c83ff 100%);
}

.button:not(.valid):hover {
    background: #FF5252;
}

.button:after {
    content: "";
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 24 24'%3e%3cpath fill='white' d='M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z'/%3e%3c/svg%3e");
    background-position: 50% 50%;
    background-repeat: no-repeat;
}

.button.valid:after {
    animation: a infinite 1s;
}

.group:nth-last-of-type(2) .button:after {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 24 24'%3e%3cpath fill='white' d='M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z'/%3e%3c/svg%3e");
}

.button:not(.valid):hover:after {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3e%3cpath fill='white' d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z'/%3e%3c/svg%3e");
}

.download {
    color: white;
    padding: 19px;
    text-align: center;
}

.satu {
    transform: rotateX(90deg) translateY(-30px) translateZ(30px);
    opacity: 0;
    transition: transform 1s, box-shadow 0.5s, opacity 0.7s 0.3s;
}

.dua {
    transform: none;
    box-shadow: 0 30px 40px rgba(0, 0, 0, 0.15);
    transition: transform 1s, box-shadow 0.5s 0.5s, opacity 0.7s;
}

.tiga {
    transform: rotateX(-90deg) translateY(30px) translateZ(30px);
    opacity: 0;
}

.container .progress {
    color: white;
    position: absolute;
    bottom: 80px;
    right: 1px;
    text-align: right;
}

@keyframes a {
    0%,
    100% {
        background-position: 50% 40%;
    }
    50% {
        background-position: 50% 60%;
    }
}

              
            
!

JS

              
                var g = document.getElementsByClassName("group"),
    c = 0,
    i,
    v = false;

for (i = 0; i < g.length - 1; i++) {
    g[i].querySelector("input").onkeyup = g[i].querySelector("input").onchange = function() {
        if (this.validity.valid == true) {
            v = true;
            this.nextSibling.classList.add("valid");
        } else {
            v = false;
            this.nextSibling.classList.remove("valid");
        }
    };
    g[i].querySelector(".button").onclick = function() {
        if (v == true) {
            c++;
            this.parentNode.className = "group satu";
            this.parentNode.nextSibling.className = "group dua";
            document.querySelector(".progress").innerHTML =
                c +
                "/" +
                (g.length - 1) +
                " COMPLETED." +
                (c == g.length - 1
                    ? " THANK YOU FOR FILLING UP THE FORM."
                    : "");
            v = false;
        }
    };
}

              
            
!
999px

Console