svg+css+js实现车站汽车发车时间表卡片代码
代码语言:html
所属分类:布局界面
代码描述:svg+css+js实现车站汽车发车时间表卡片代码,可显示所有时间表,默认显示当前时间的下一班次发车时间。
代码标签: svg css js 车站 汽车 发车 时间表 卡片 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/tailwindcss.3.4.16.js"></script> <link href="https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600&display=swap" rel="stylesheet"> <style> body { font-family: "Fira Code", monospace; background-color: #111827; /* Darker Slate Gray */ color: #d1d5db; /* Light Gray */ display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 1rem; overflow: hidden; } .dashboard-widget { border: 1px solid #4b5563; width: 100%; max-width: 500px; transition: background-color 0.5s ease, border-color 0.5s ease; position: relative; overflow: hidden; } #background-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; /* Behind the content */ } .content-wrapper { position: relative; z-index: 1; background-color: rgba(17, 24, 39, 0.6); /* Made overlay more transparent */ backdrop-filter: blur(6px); /* Reduced blur effect */ } .schedule-section { transition: opacity 0.4s ease-in-out; cursor: pointer; -webkit-tap-highlight-color: transparent; } .primary { opacity: 1; } .secondary { opacity: 0.4; } .secondary:hover { opacity: 0.7; } .next-time-glow { text-shadow: 0 0 10px rgba(34, 197, 94, 0.5); } .header-glow { text-shadow: 0 0 10px rgba(59, 130, 246, 0.4); } .view-container { transition: max-height 0.5s ease-in-out, opacity 0.3s ease-in-out; overflow: hidden; } /* Dev Tools */ .dev-tools { transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); transform: translateX(110%); } .range-slider { -webkit-appearance: none; width: 100%; height: 10px; border-radius: 5px; background: #374151; outline: none; padding: 0; margin: 0; } .range-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #3b82f6; cursor: pointer; transition: background 0.15s ease-in-out; } .range-slider::-webkit-slider-thumb:hover { background: #60a5fa; } .range-slider::-moz-range-thumb { width: 20px; height: 20px; border: 0; border-radius: 50%; background: #3b82f6; cursor: pointer; transition: background 0.15s ease-in-out; } .range-slider::-moz-range-thumb:hover { background: #60a5fa; } /* Date Picker */ .date-picker-modal { transition: opacity 0.2s ease-in-out; } .calendar-day:not(.disabled):hover { background-color: #3b82f6; color: white; } .calendar-day.selected { background-color: #2563eb; color: white; } .calendar-day.disabled { color: #4b5563; cursor: not-allowed; } /* Schedule Column Hover */ .schedule-column:hover { background-color: rgba(75, 85, 99, 0.2); } /* Hierarchy Styles */ .primary .next-time { font-size: 2.25rem; line-height: 2.5rem; } .primary .arrival-time { font-size: 1rem; line-height: 1.5rem; opacity: 0.8; } .primary .countdown { display: block; font-size: 1.125rem; line-height: 1.75rem; } .secondary .next-time { font-size: 1.5rem; line-height: 2rem; color: #9ca3af; } .secondary .arrival-time { font-size: 0.875rem; line-height: 1.25rem; opacity: 0.6; } .secondary .countdown { display: none; } /* Kraken Easter Egg Theme */ .kraken-theme #background-canvas { display: none; /* Hide water canvas during kraken */ } .kraken-theme .content-wrapper { background-color: rgba(13, 37, 56, 0.9) !important; } .kraken-theme { border-color: #17a2b8 !important; } .kraken-theme * { color: #17a2b8 !important; text-shadow: 0 0 5px #17a2b8; } .kraken-theme a, .kraken-theme .primary, .kraken-theme .calendar-day.selected, .kraken-theme .range-slider::-webkit-slider-thumb { border-color: #17a2b8 !important; background-color: #0d2538 !important; } .kraken-theme svg { fill: #17a2b8 !important; } #kraken-tentacles { position: absolute; bottom: -150px; /* Start hidden */ left: 0; width: 100%; height: 150px; pointer-events: none; transition: transform 1.5s cubic-bezier(0.68, -0.55, 0.27, 1.55); z-index: 2; } #kraken-tentacles.active { transform: translateY(-150px); } </style> </head> <body translate="no"> <div class="flex flex-col items-center"> <div class="dashboard-widget rounded-xl shadow-2xl"> <canvas id="background-canvas"></canvas> <div class="content-wrapper"> <header class="relative p-4 border-b border-gray-700/50"> <div id="progress-container" class="absolute top-0 left-0 w-full h-1 bg-gray-700 hidden"> <div id="progress-bar" class="h-full bg-blue-500 transition-all duration-1000 ease-linear"></div> </div> <div class="flex items-center justify-between"> <h1 class="text-lg font-semibold header-glow text-blue-300 cursor-pointer">WS Ferry</h1> <div class="flex items-center space-x-2"> <button id="todayBtn" class="text-gray-400 hover:text-white transition-colors hidden" title="Reset to Today"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> <path fill-ru.........完整代码请登录后点击上方下载按钮下载查看
网友评论0