news 2026/5/6 10:12:43

12.17 脚本网页 创意导航

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
12.17 脚本网页 创意导航

分享一下短小,好看的导航 「不到200」

<!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> * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; min-height: 100vh; overflow-x: hidden; position: relative; background: linear-gradient(135deg, #2e1a47 0%, #4a2c6e 50%, #6b3f8f 100%); color: #ffffff; } .background { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; background: linear-gradient(135deg, #2e1a47 0%, #4a2c6e 50%, #6b3f8f 100%); } .bg-pattern { position: absolute; width: 100%; height: 100%; background-image: radial-gradient(circle at 20% 30%, rgba(255, 105, 180, 0.2) 0%, transparent 50%), radial-gradient(circle at 80% 70%, rgba(138, 43, 226, 0.2) 0%, transparent 50%); animation: bgFloat 20s ease-in-out infinite; } @keyframes bgFloat { 0%, 100% { transform: translate(0, 0) rotate(0deg); } 50% { transform: translate(-10px, -10px) rotate(1deg); } } .container { position: relative; z-index: 1; max-width: 500px; margin: 0 auto; padding: 15px; min-height: 100vh; display: flex; flex-direction: column; } header { text-align: center; margin-bottom: 25px; animation: fadeInDown 0.8s ease; } header h1 { font-size: 1.8rem; font-weight: 700; margin-bottom: 5px; background: linear-gradient(135deg, #ff69b4, #ba55d3, #9370db); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; } header p { font-size: 0.9rem; color: rgba(255, 255, 255, 0.7); } .nav-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; flex: 1; align-content: start; padding: 10px 0; animation: fadeInUp 0.8s ease 0.2s both; } .tool-card { background: linear-gradient(135deg, rgba(255, 105, 180, 0.15), rgba(186, 85, 211, 0.15)); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.2); cursor: pointer; transition: all 0.3s ease; position: relative; overflow: hidden; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); width: 100%; aspect-ratio: 1; transform: rotate(45deg); display: flex; align-items: center; justify-content: center; } .tool-card-content { transform: rotate(-45deg); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; width: 70%; height: 70%; } .tool-card:hover { transform: rotate(45deg) scale(1.1); background: linear-gradient(135deg, rgba(255, 105, 180, 0.25), rgba(186, 85, 211, 0.25)); box-shadow: 0 8px 25px rgba(255, 105, 180, 0.3); } .tool-icon { font-size: 1.5rem; margin-bottom: 5px; transition: all 0.3s ease; } .tool-card:hover .tool-icon { transform: scale(1.2); filter: drop-shadow(0 0 10px rgba(255, 105, 180, 0.6)); } .tool-title { font-size: 0.7rem; font-weight: 600; color: #ffffff; line-height: 1.1; } @keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } } @keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } @media (max-width: 400px) { header h1 { font-size: 1.6rem; } .nav-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; } .tool-icon { font-size: 1.3rem; } .tool-title { font-size: 0.65rem; } } </style> </head> <body> <div class="background"> <div class="bg-pattern"></div> </div> <div class="container"> <header> <h1>✨服务导航中心</h1> <p>精选实用工具,一键直达</p> </header> <div class="nav-grid" id="navGrid"> <!-- 工具卡片将在这里动态生成 --> </div> </div> <script src="服务_nav-config.js"></script> <script> // 初始化应用 class NavigationApp { constructor() { this.init(); } init() { // 等待配置加载完成 if (typeof window.navConfig === 'undefined') { setTimeout(() => this.init(), 100); return; } // 直接渲染所有工具 this.renderAllTools(); } renderAllTools() { const navGrid = document.getElementById('navGrid'); const tools = window.navConfig.getAllTools(); // 渲染工具卡片 navGrid.innerHTML = tools.map(tool => ` <div class="tool-card" onclick="navigateTo('${tool.file}')"> <div class="tool-card-content"> <div class="tool-icon">${tool.icon || '🔧'}</div> <div class="tool-title">${tool.name}</div> </div> </div> `).join(''); } } // 导航到指定页面 function navigateTo(file) { window.location.href = file; } // 启动应用 document.addEventListener('DOMContentLoaded', () => { new NavigationApp(); }); </script> </body> </html>

配置文件

window.navConfig = { /* --------------------- 工具列表 --------------------- */ tools: [ { name: '关山酒', file: '1.关山酒.html', icon: '🍶', description: '关山酒相关功能' }, { name: 'HTML截图', file: '2.html截图.html', icon: '🖼️', description: '生成HTML页面的截图' }, { name: 'cflow项目分析', file: '3.cflow_ctags项目分析.html', icon: '🔍', description: '使用cflow和ctags进行代码流程分析' }, { name: 'Python代码分析', file: '4_python代码分析.html', icon: '🐍', description: 'Python代码静态分析和可视化工具' }, { name: '文件合并拆分', file: '5.文件_合并拆分.html', icon: '📁', description: '合并和拆分多个文件内容,方便统一处理' }, ], /* --------------------- 公共方法 --------------------- */ getAllTools() { return this.tools; }, };
版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/4/30 20:48:12

深度定制Draft.js工具栏:从基础搭建到高阶优化实战指南

深度定制Draft.js工具栏&#xff1a;从基础搭建到高阶优化实战指南 【免费下载链接】draft-js A React framework for building text editors. 项目地址: https://gitcode.com/gh_mirrors/dra/draft-js 想要打造与众不同的富文本编辑器界面吗&#xff1f;厌倦了千篇一律…

作者头像 李华
网站建设 2026/5/1 18:38:11

【dz-989】基于单片机的车载环境监测与控制系统设计

摘 要 本文设计了一款基于STM32F103C8T6单片机的车载环境监测与控制系统。该系统能够实时监测车内温湿度、烟雾浓度、甲醛浓度和粉尘浓度。使用DHT11传感器监测温湿度&#xff0c;当温度超出正常范围时&#xff0c;系统会自动打开空调&#xff08;风扇模拟&#xff09;&#x…

作者头像 李华
网站建设 2026/5/6 7:23:40

MTK(系统篇) 添加一个config宏用于控制

第一步&#xff1a;在编译到的xxx_deconfig文件里面添加一个定义好的宏。第二步&#xff1a;Kconfig配置宏的定义方法。第三步&#xff1a;Makefile中使用控制宏。第四步&#xff1a;在代码里面添加判断条件。

作者头像 李华
网站建设 2026/4/30 5:05:03

SpringCloud —— 配置管理

一、前言至此&#xff0c;微服务的基本开发我们就学习完了&#xff0c;接下来学习的是为了简便维护成本和保障服务安全的技术了&#xff0c;这里首先要讲的就是配置管理&#xff0c;配置管理是通过Nacos来实现的&#xff0c;对复用率高的配置进行统一管理共享&#xff0c;所以在…

作者头像 李华
网站建设 2026/5/6 4:05:28

Context7 MCP Server容器化部署:告别环境配置噩梦的终极解决方案

Context7 MCP Server容器化部署&#xff1a;告别环境配置噩梦的终极解决方案 【免费下载链接】context7-mcp Context7 MCP Server 项目地址: https://gitcode.com/gh_mirrors/co/context7-mcp 还在为MCP Server的环境配置问题而彻夜难眠吗&#xff1f;每次部署都像是拆弹…

作者头像 李华
网站建设 2026/5/6 1:40:29

[160] Intersection of Two Linked Lists 链表相交

[160] Intersection of Two Linked Lists 力扣题目链接 1. 长度对齐法 1.1 思想 相交链表的两个性质&#xff1a; 共享尾部 如果两个单向链表相交&#xff0c;那么从第一个相交节点开始&#xff0c;到链表末尾的所有节点&#xff0c;都是两条链表完全共享的。它们不可能在此…

作者头像 李华