https://augustpinch.com/qnd7d2fhd?key=ed5dbed8ecdd9af92e2b54e652945382
8
Monday, May 5, 2025
ZIP FILE MAKER TOOL
Here's a simple example of a ZIP file maker tool using HTML, CSS, and JavaScript. This tool uses the JSZip library to generate ZIP files.
HTML
```
ZIP File Maker
```
CSS (in style.css file)
```
body {
font-family: Arial, sans-serif;
background-color: #f0f0f0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
}
.container {
background: white;
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
width: 80%;
max-width: 600px;
text-align: center;
}
input[type="file"] {
margin-bottom: 10px;
}
button {
padding: 10px 20px;
background-color: #007bff;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
}
button:hover {
background-color: #0056b3;
}
#download-zip {
margin-top: 10px;
padding: 10px 20px;
background-color: #007bff;
color: white;
border-radius: 4px;
text-decoration: none;
}
#download-zip:hover {
background-color: #0056b3;
}
```
JavaScript (in script.js file)
```
let fileInput = document.getElementById('file');
let createZipButton = document.getElementById('create-zip');
let downloadZipLink = document.getElementById('download-zip');
createZipButton.addEventListener('click', createZip);
function createZip() {
let zip = new JSZip();
let files = fileInput.files;
for (let i = 0; i < files.length; i++) {
let file = files[i];
zip.file(file.name, file);
}
zip.generateAsync({ type: 'blob' })
.then(function(blob) {
let url = URL.createObjectURL(blob);
downloadZipLink.href = url;
downloadZipLink.download = 'files.zip';
downloadZipLink.style.display = 'inline-block';
});
}
```
How
Subscribe to:
Post Comments (Atom)
SMART AFFILIATE LINK GENERATOR
Smart Affiliate Link Generator 💰 Smart Affiliate Link Generator Enter your blog/content: Enter keywords and affili...
-
Smart Affiliate Link Generator 💰 Smart Affiliate Link Generator Enter your blog/content: Enter keywords and affili...
-
*Online Stock Photography: Sell Your Snaps* Are you a budding photographer with a penchant for snapping stunning images? Look no further! O...
-
AI Story Writing Tool AI Story Writing Tool Moral Educational Historical ...
No comments:
Post a Comment