initial
This commit is contained in:
commit
74ae93a96e
1 changed files with 94691 additions and 0 deletions
|
|
@ -0,0 +1,35 @@
|
|||
Custom upload File Button
|
||||
|
||||
```html
|
||||
<input type="file" id="actual-btn"/>
|
||||
<label for="actual-btn">Choose File</label>
|
||||
```
|
||||
|
||||
```css
|
||||
.input{
|
||||
display: none;
|
||||
}
|
||||
|
||||
label {
|
||||
background-color: indigo;
|
||||
color: white;
|
||||
padding: 0.5rem;
|
||||
font-family: sans-serif;
|
||||
border-radius: 0.3rem;
|
||||
cursor: pointer;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
or instead of label div or other element can be used too
|
||||
|
||||
```html
|
||||
<!-- default HTML file upload button -->
|
||||
<input type="file" id="actual-btn" style="display: none;" />
|
||||
|
||||
<!-- custom file upload button using a <button> element -->
|
||||
<div onclick="document.getElementById('actual-btn').click();">Choose File</button>
|
||||
|
||||
```
|
||||
|
||||
Loading…
Reference in a new issue