diff --git a/js.js b/js.js index c952792..951c8a5 100644 --- a/js.js +++ b/js.js @@ -3,9 +3,9 @@ document.addEventListener('DOMContentLoaded', function () { const inputFile = document.querySelector('#input__img'); const labelInput = document.querySelector('.label-input'); - const textSpanInput = "Imagem"; + const textLabelInput = "Imagem"; - labelInput.innerHTML = textSpanInput; + labelInput.innerHTML = textLabelInput; inputFile.addEventListener('change', (e) => { const inputTarget = e.target; @@ -25,11 +25,14 @@ document.addEventListener('DOMContentLoaded', function () { labelInput.appendChild(img); }); + reader.readAsDataURL(file); labelInput.innerHTML = ""; + labelInput.style.border = "none"; + }else { - labelInput.innerHTML = textSpanInput; + labelInput.innerHTML = textLabelInput; } }); diff --git a/style.css b/style.css index f8e61c2..83d0414 100644 --- a/style.css +++ b/style.css @@ -54,7 +54,8 @@ } .img-result { - max-width: 100%; + width: 100%; + border-radius: 8px; } .wrapper-input__text {