Thứ Ba, 20 tháng 8, 2019

Pure CSS Custom File Upload

HTML

<label for="file-upload" class="custom-file-upload">
    <i class="fa fa-cloud-upload"></i> Custom Upload
</label>
<input id="file-upload" type="file"/>

<label for="file-upload" class="custom-file-upload-1">
    <img class="img-file-upload" src="https://cdn3.iconfinder.com/data/icons/miniglyphs/500/064-512.png"/>
</label>
<input id="file-upload" type="file"/>

CSS

input[type="file"] {
    display: none;
}
.custom-file-upload {
    border: 1px solid #ccc;
    display: inline-block;
    padding: 6px 12px;
    cursor: pointer;
}

.custom-file-upload-1 {
    border: 1px solid #ccc;
    display: inline-block;
    padding: 6px 12px;
    cursor: pointer;
}
.img-file-upload{
  width:32px;
  height:32px;
}




Không có nhận xét nào:

Đăng nhận xét