进度条

一个具有微交互设计的进度条组件。包括响应效果和仅使用HTML和CSS(Tailwind CSS)的深色主题支持。

预览

HTML 代码

<div class="w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700">
  <div class="bg-blue-600 h-2.5 rounded-full" style="width: 45%; animation: progress-animation 2s infinite;"></div>
</div>

<style>
@keyframes progress-animation {
  0% { width: 0%; }
  100% { width: 45%; }
}

.dark .bg-blue-600 {
  background-color: #90cdf4; /* Lighter blue for dark mode */
}

/* Responsive considerations */
@media (max-width: 768px) {
  @keyframes progress-animation {
    0% { width: 0%; }
    100% { width: 60%; } /* Wider progress on smaller screens */
  }
  .bg-blue-600 {
    animation: progress-animation 2s infinite; /* Apply animation again for clarity */
  }
}
</style>

相关组件

轮廓式进度条

一个采用新拟态风格设计的响应式进度条组件,使用Tailwind CSS,支持明暗两种主题。

打开

Bauhaus 进度条组件

一个中等复杂度、响应迅速、受包豪斯启发的进度条组件,适用于娱乐/媒体平台,具有酷炫的中性色和深色模式支持。

打开

Skeuomorphic_Monochromatic_Progress_Bar

用于电子商务的中等复杂度拟物进度条组件,具有单色配色方案、完全响应性和深色模式支持。

打开