news 2026/5/25 16:38:54

12.15 脚本网页 日记导航

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
12.15 脚本网页 日记导航

功能,一个导航页

优点,只需300行

<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> <title>🚀 12.15 技术笔记</title> <style> /* 基础重置 */ * { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; } /* 变量定义 */ :root { --primary: #4a90e2; --secondary: #7b68ee; --accent: #ff6b6b; --text-primary: #ffffff; --text-secondary: rgba(255, 255, 255, 0.85); --card-bg: rgba(255, 255, 255, 0.12); --border-color: rgba(255, 255, 255, 0.25); } /* 全局样式 */ html, body { height: 100%; width: 100%; overflow: hidden; } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: linear-gradient(135deg, #a8edea 0%, #fed6e3 25%, #ffeaa7 50%, #dfe6e9 75%, #a8e6cf 100%); background-size: 400% 400%; animation: gradient-flow 18s ease infinite; color: var(--text-primary); display: flex; flex-direction: column; position: relative; } @keyframes gradient-flow { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } } /* 柔和遮罩 */ .overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%); backdrop-filter: blur(2px); z-index: -1; } /* 头部 */ .header { padding: 25px 20px; text-align: center; background: rgba(255, 255, 255, 0.15); backdrop-filter: blur(15px); border-bottom: 1px solid rgba(255, 255, 255, 0.3); box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05); } .header h1 { font-size: 26px; color: #2d3436; margin-bottom: 8px; font-weight: 700; letter-spacing: 0.5px; } .header p { font-size: 14px; color: #636e72; font-weight: 500; } /* 内容区 */ .content { flex: 1; padding: 20px; overflow-y: auto; -webkit-overflow-scrolling: touch; } /* 卡片列表 */ .card-list { display: flex; flex-direction: column; gap: 15px; max-width: 400px; margin: 0 auto; } /* 卡片样式 */ .card { background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 20px; padding: 20px; display: flex; align-items: center; gap: 18px; cursor: pointer; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); animation: fadeInUp 0.6s ease forwards; opacity: 0; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); } @keyframes fadeInUp { from { opacity: 0; transform: translateY(25px); } to { opacity: 1; transform: translateY(0); } } .card:hover { transform: translateY(-8px) scale(1.03); background: rgba(255, 255, 255, 0.95); box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15); border-color: rgba(255, 255, 255, 0.8); } /* 卡片图标 */ .card-icon { font-size: 34px; width: 55px; height: 55px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: 15px; box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3); } /* 卡片内容 */ .card-info { flex: 1; } .card-title { font-size: 17px; font-weight: 600; margin-bottom: 6px; color: #2d3436; } .card-desc { font-size: 13px; color: #636e72; line-height: 1.5; } /* 底部控制 */ .controls { padding: 20px; display: flex; justify-content: center; background: rgba(255, 255, 255, 0.15); backdrop-filter: blur(15px); border-top: 1px solid rgba(255, 255, 255, 0.3); } .btn { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border: none; color: white; padding: 14px 35px; border-radius: 30px; cursor: pointer; transition: all 0.3s ease; font-size: 15px; font-weight: 600; font-family: inherit; box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3); } .btn:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4); } .btn:active { transform: translateY(0); } /* 响应式 */ @media (max-width: 380px) { .header h1 { font-size: 22px; } .card { padding: 16px; } .card-icon { font-size: 30px; width: 48px; height: 48px; } .card-title { font-size: 15px; } .card-desc { font-size: 12px; } } </style> </head> <body> <div class="overlay"></div> <div class="header"> <h1>🚀 12.15 技术笔记</h1> <p>Linux驱动开发学习</p> </div> <div class="content"> <div class="card-list" id="cardList"></div> </div> <div class="controls"> <button class="btn" id="shuffleBtn">🔀 随机排序</button> </div> <script> // 数据 const items = [ { name: '迅为-Linux驱动1-5', file: '1.迅为-linux驱动1-5.html', icon: '🐧', desc: 'Linux驱动开发基础教程第1-5章' }, { name: 'Go自定义类型', file: '1.go自定义类型.html', icon: '🔷', desc: 'Go语言中的类型定义与结构体' } ]; // 渲染卡片 function renderCards() { const container = document.getElementById('cardList'); container.innerHTML = ''; items.forEach((item, index) => { const card = document.createElement('div'); card.className = 'card'; card.style.animationDelay = `${index * 0.1}s`; card.innerHTML = ` <div class="card-icon">${item.icon}</div> <div class="card-info"> <div class="card-title">${item.name}</div> <div class="card-desc">${item.desc}</div> </div> `; card.onclick = () => window.location.href = item.file; container.appendChild(card); }); } // 随机排序 function shuffle() { items.sort(() => Math.random() - 0.5); renderCards(); } // 初始化 document.getElementById('shuffleBtn').addEventListener('click', shuffle); renderCards(); </script> </body> </html>
版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/5/26 5:36:25

2025终端AI新突破:GLM-Edge-4B-Chat如何重塑边缘智能生态

导语 【免费下载链接】glm-edge-4b-chat 项目地址: https://ai.gitcode.com/zai-org/glm-edge-4b-chat 清华大学知识工程实验室推出的GLM-Edge-4B-Chat模型&#xff0c;以40亿参数实现消费级设备本地化部署&#xff0c;标志着边缘AI从"实验性"迈向"实用…

作者头像 李华
网站建设 2026/5/25 23:19:24

如何用darktable快速解决RAW照片处理难题:3个核心步骤

如何用darktable快速解决RAW照片处理难题&#xff1a;3个核心步骤 【免费下载链接】darktable darktable is an open source photography workflow application and raw developer 项目地址: https://gitcode.com/GitHub_Trending/da/darktable 还在为RAW照片的复杂后期…

作者头像 李华
网站建设 2026/5/25 12:21:29

Tiled六边形地图坐标转换:从开发痛点到大神级解决方案

【免费下载链接】tiled 项目地址: https://gitcode.com/gh_mirrors/til/tiled 当你第一次在Tiled中创建六边形地图时&#xff0c;是否感觉坐标系统就像一团乱麻&#xff1f;别担心&#xff0c;这几乎是每个游戏开发者的必经之路。本文将带你彻底解决这个技术难题&#x…

作者头像 李华
网站建设 2026/5/24 21:11:00

Holo1.5开源:38.5%年增长市场中的UI智能交互突破

Holo1.5开源&#xff1a;38.5%年增长市场中的UI智能交互突破 【免费下载链接】Holo1.5-3B 项目地址: https://ai.gitcode.com/hf_mirrors/Hcompany/Holo1.5-3B 导语 H Company正式开源Holo1.5系列视觉语言模型&#xff0c;通过3B/7B/72B多规格配置&#xff0c;将计算机…

作者头像 李华
网站建设 2026/5/26 6:57:10

终极B站视频下载指南:一键批量保存你的最爱内容

你是否曾经遇到过这样的情况&#xff1a;看到一个精彩的B站视频想要收藏&#xff0c;却发现无法离线观看&#xff1f;或者想要批量保存自己喜欢的UP主系列视频&#xff0c;却苦于一个个下载太麻烦&#xff1f;现在&#xff0c;这些烦恼都将迎刃而解&#xff01; 【免费下载链接…

作者头像 李华
网站建设 2026/5/25 18:47:18

NVIDIA DALI数据预处理加速:8个深度优化实践方法

NVIDIA DALI数据预处理加速&#xff1a;8个深度优化实践方法 【免费下载链接】DALI NVIDIA/DALI: DALI 是一个用于数据预处理和增强的 Python 库&#xff0c;可以用于图像&#xff0c;视频和音频数据的处理和增强&#xff0c;支持多种数据格式和平台&#xff0c;如 Python&…

作者头像 李华