<input name="myFile" type="file">

In this example below you will see how to do a <input name="myFile" type="file"> with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by Jason_, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright Jason_ ©
  • HTML
  • CSS
  • JavaScript
    <!-- Learn about this code on MDN: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file -->

<input name="myFile" type="file" id="my-input">
<label for="my-input">my input</label>

/*Downloaded from https://www.codeseek.co/Jason_/andltinput-nameandquotmyfileandquot-typeandquotfileandquotandgt-qjexYJ */
    input {
  display:none;
}

label {
  height:50px;
  width:200px;
  border: solid 1px #ccc;
  display:flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #4e4;
  color: #efefef;
  font-size: 2em;
  font-family: Sans-Serif;
  
}


/*Downloaded from https://www.codeseek.co/Jason_/andltinput-nameandquotmyfileandquot-typeandquotfileandquotandgt-qjexYJ */
    

Comments