попробовать это:
скрипку с JQuery: https://jsfiddle.net/2e7dLvoy/4/
HTML
<label class="custom-file-input">
<input type="file" name="file" id="videofile" /> <!--class="dropzone"-->
<p id="selectedFile"></p>
</label>
CSS
.custom-file-input {
display: inline-block;
position: relative;
color: #533e00;
}
.custom-file-input input {
visibility: hidden;
width: 100px
}
.custom-file-input:before {
content: 'Drag & Drop';
display: block;
background: -webkit-linear-gradient(-180deg, #ffdc73, #febf01);
background: -o-linear-gradient(-180deg, #ffdc73, #febf01);
background: -moz-linear-gradient(-180deg, #ffdc73, #febf01);
background: linear-gradient(-180deg, #ffdc73, #febf01);
border: 3px solid #dca602;
border-radius: 10px;
padding: 5px 0px;
outline: none;
white-space: nowrap;
cursor: pointer;
text-shadow: 1px 1px rgba(255,255,255,0.7);
font-weight: bold;
text-align: center;
font-size: 10pt;
position: absolute;
left: 0;
font-size: 12px;
}
.custom-file-input:hover:before {
border-color: #febf01;
}
.custom-file-input:active:before {
background: #febf01;
}
p {
float: left;
margin: -5% 14% 0% 32%;
}
JQuery
$('input[type=file]').change(function(e){
$in=$(this);
$('#selectedFile').html($in.val());
});
У вас есть 'input' элемент скрытый, который отображает имя файла. –
Я удалил его, и теперь кнопка перекрылась. https://jsfiddle.net/2e7dLvoy/1/ –
Просто нашел это [ссылка] (http://geniuscarrier.com/how-to-style-a-html-file-upload-button-in-pure-css/) –