Pen Settings



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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource


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


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.


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.


                <!DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8">

<!-- Agregamos un <a> al lado del input -->
<div class="wrapper form-managed-file">
    <input type="file" class="form-file"/>
    <a href="#" class="trigger-upload">File upload</a>



                /* Ajustes necesarios */
/* ////////////////// */
/* Es importante dejar el input fuera
de la visualización, pero sin ocultarlo,
para poder aplicarle el click */
.form-managed-file input.form-file {
    position: absolute;
    left: -1000em;
/* ////////////////// */

/* Ajustes generales y opcionales a modo ilustrativo */
@import url(',700');

body {
    color: #555;
    font: 16px/1 'Source Sans Pro', sans-serif;

body * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;

.wrapper {
    max-width: 400px;
    padding: 100px 0;
    margin: 0 auto;

.form-managed-file a {
    display: inline-block;
    color: white;
    font-size: 20px;
    font-weight: 900;
    text-align: center;
    background: #345c97;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all 500ms;
    text-decoration: none;
    padding: 14px 77px 13px;

.form-managed-file a:before {
    content: "";
    display: block;
    height: 500%;
    width: 150%;
    background: linear-gradient(45deg, rgba(95, 247, 227, 0.72) 0%, rgba(95, 247, 227, 0.74) 6%, rgba(80, 52, 151, 0.87) 70%, rgba(80, 52, 151, 1) 100%);
    transform-origin: 100% 0;
    transform: rotate(10deg) translateZ(0);
    -ms-transform: rotate(10deg);
    transition: all 700ms;
    z-index: -1;
    position: absolute;
    top: 0;
    right: 0;
    left: -200%;

.form-managed-file a:hover:before {
    left: 0;



                $(function () {

  // Capturamos el click en el <a>
  // prevenimos el comportamiento por defecto
  // y replicamos el click en su hermano input.
  $(".trigger-upload").on("click", function (e) {