File Drag And Drop Upload Image Preview Javascript Before Stor


 





  


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>HTML VS CSS</title>
    <STyle>

.frame {
    positionabsolute;
    top50%;
    left50%;
    width400px;
    height400px;
    margin-top-200px;
    margin-left-200px;
    border-radius2px;
    box-shadow4px 8px 16px 0 rgba(0000.1);
    overflowhidden;
    color#333;
    font-family"Open Sans"Helveticasans-serif;
}

.center {
    positionabsolute;
    top50%;
    left50%;
    transformtranslate(-50%-50%);
    width300px;
    height260px;
    border-radius3px;
    box-shadow8px 10px 15px 0 rgba(0000.2);
    background#fff;
    displayflex;
    align-itemscenter;
    justify-contentspace-evenly;
    flex-directioncolumn;
}



h1 {
    font-size16px;
    font-weight300;
    color#666;
}

.dropzone {
    width200px;
    height150px;

    border-radius3px;
    text-aligncenter;
}

.upload-icon {
    margin25px 2px 2px 2px;
}

.upload-input {
    positionrelative;
    top-62px;
    left0;
    width100%;
    height100%;
    opacity0;
}

.btn {
    displayblock;
    width140px;
    height40px;
    backgroundrgb(2552080);
    color#fff;
    border-radius3px;
    border0;
    box-shadow0 3px 0 0 rgb(432550);
    transitionall 0.3s ease-in-out;
    font-size14px;
}



img{
    width200PX;
}
H2{
    text-aligncenter;
    font-size50px;
}
    </STyle>
</head>
<body>
    <h2>HTML VS CSS</h2>
    <div class="frame">
        <div class="center">
            <div class="title">
                <h1>Drop file to upload</h1>
            </div>
    
            <div class="dropzone">
                <img src="http://100dayscss.com/codepen/upload.svg" class="upload-icon"  id="REP"/>
                <input type="file" class="upload-input"  id="img"/>
            </div>
     
            <button type="button" class="btn" name="uploadbutton"><b>Upload file</b></button>
    
        </div>
    </div>
  
</body>
<SCript>
    img.onchange = evt => {
  const [file] = img.files
  if (file) {
    REP.src = URL.createObjectURL(file)
  }
}
</SCript>
</html>


  • File Drag And Drop Upload
  • Drag And Drop File Upload Bootstrap
  • Drag And Drop File Upload Codepen
  • Drag And Drop File Upload Tutorial
  • Drag And Drop File Upload Example
  • Drag And Drop File Upload With Submit Button
  • Html5 Drag And Drop File Upload
  • Drag And Drop File Upload Codepen
  • Drag And Drop Image Preview Javascript


How To Use This Cord

steps

  1. Fast One Copy Html File.
  2. Copy CSS File And Past Head Part Top Fo Html File.  
  3. File Save Name.html
  4. Ran Html File 
  5. Ready To Use

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.