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.25re.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0