Add a file input with styling for the image upload
This commit is contained in:
parent
186eab6253
commit
459d275f87
|
|
@ -1,6 +1,7 @@
|
|||
<template>
|
||||
<div class="image-form">
|
||||
<h1>Image Form</h1>
|
||||
<input id="image-input" type="file" class="image-form__file-input">
|
||||
<label class="image-form__button" for="image-input">Bild vom Computer hochladen</label>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -11,5 +12,26 @@
|
|||
@import "@/styles/_variables.scss";
|
||||
|
||||
.image-form {
|
||||
&__file-input {
|
||||
width: 0.1px;
|
||||
height: 0.1px;
|
||||
overflow: hidden;
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
z-index: -1;
|
||||
|
||||
& + label {
|
||||
cursor: pointer;
|
||||
background-color: $color-lightgrey;
|
||||
height: 150px;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-family: $sans-serif-font-family;
|
||||
font-weight: 500;
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Reference in New Issue