Skip to content

Instantly share code, notes, and snippets.

@RiodeJaneiroo
Created March 31, 2018 13:14
Show Gist options
  • Save RiodeJaneiroo/65ace39fbb5d5ea7384c5238f1f8c02b to your computer and use it in GitHub Desktop.
Save RiodeJaneiroo/65ace39fbb5d5ea7384c5238f1f8c02b to your computer and use it in GitHub Desktop.
style input file
<div class="form-group">
<label class="control-label" for="af_message">Загрузите скриншот</label><br><br>
<label for="input-file" class="input-upload">
<input name="project" type="file" id="input-file" accept=".jpg, .jpeg, .png, .psd, .pdf, .doc, .docx">
<img src="/tmp/img/arrow-up.svg" alt="upload file" />
<br>
<span>выбрать файл для отправки</span>
</label>
</div>
.input-upload {
text-align: center;
width: 100%;
display: inline-block;
cursor: pointer;
margin-bottom: 10px;
box-sizing: border-box;
padding: 10px;
color: #5ea5f2;
background-image: -moz-linear-gradient( 90deg, rgb(225, 238, 252) 0%, rgb(242, 242, 230) 100% );
background-image: -webkit-linear-gradient( 90deg, rgb(225, 238, 252) 0%, rgb(242, 242, 230) 100% );
background-image: -ms-linear-gradient( 90deg, rgb(225, 238, 252) 0%, rgb(242, 242, 230) 100% );
}
.input-upload > input {
display: none;
}
.input-upload img {
width: 20px;
height: 22px;
margin-bottom: 5px;
}
@RiodeJaneiroo
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment