JSFiddle - React, Tailwind, and code Playground

by Znarkus

HTML

<!--<div id="one">
    <label for="file">Select file</label>
    <input type="file" id="file">
    </div>

<div id="two">
    <label>
        <span>Select file</span>
        <input type="file">
    </label>
</div>

<div id="three">
    <label>
        <span>Select file</span>
        <input type="file">
    </label>
</div>

<div id="four">
    <span>Select file</span>
    <input type="file">
</div>-->

<div id="five">
    <span>Select file</span>
    <div><input type="file"></div>
</div>

CSS

input {
    position: absolute;
    top: -9999px;
}

label, #four span, #five span {
    background: red;
    display: block;
    width: 400px;
    margin: 20px auto;
    padding: 50px;
    text-align: center;
    font-size: 30px;
}

#two label {
    background: blue;
}

#three input {
    position: static;
}

#three label {
    background: green;
}

#four span {
    background: yellow;
}

#four input, #five div {
    position: static;
    display: block;
    width: 500px;
    height: 135px;
    margin: -155px auto 0;
    background: pink;
    opacity: 0;
}

#five span {
    background: gray;
}

#five div {
    opacity: 1;
    overflow: hidden;
    position: relative;
}

#five input {
    position: static;
    display: block;
    /*position: absolute;
    left: 0;
    top: 0;*/
    transform: translate(-400px, 30px) scale(9);
    -webkit-transform: translate(-400px, 30px) scale(9);
    -ms-transform: translate(-400px, 30px) scale(9);
    cursor: pointer;
    direction: ltr;
}