js实现浏览器中图片批量压缩打包zip压缩包下载代码
代码语言:html
所属分类:其他
代码描述:js实现浏览器中图片批量压缩打包zip压缩包下载代码
代码标签: js 浏览器 图片 批量 压缩 打包 zip 压缩包 下载 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>图片批量压缩并打包下载</title> <style> body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; background-color: #f0f2f5; color: #333; margin: 0; padding: 20px; display: flex; justify-content: center; } .container { width: 100%; max-width: 800px; background-color: #fff; padding: 25px; border-radius: 12px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); } h1 { text-align: center; color: #1a73e8; margin-top: 0; } .upload-area { border-radius: 8px; padding: 30px; text-align: center; cursor: pointer; transition: background-color 0.2s ease; } .upload-area:hover { background-color: #e9f1ff; } .upload-area p { margin: 0; font-size: 16px; color: #5f6368; } #fileInput { display: none; } .options { margin: 20px 0; padding: 15px; border: 1px solid #ddd; border-radius: 8px; background-color: #fafafa; } .options-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; align-items: center; } .option-item { display: flex; flex-direction: column; } .option-item label { margin-bottom: 8px; font-weight: 500; color: #3c4043; } .option-item input[type="range"], .option-item input[type="number"] { width: 100%; } #qualityValue, #sizeValue { font-weight: bold; color: #1a73e8; } .button-group { text-align: center; margin-top: 25px; } button { background-color: #1a73e8; color: white; border: none; padding: 12px 24px; border-radius: 6px; .........完整代码请登录后点击上方下载按钮下载查看
网友评论0