HTML 代码
<div class="relative w-full max-w-4xl mx-auto mt-10">
<div class="flex overflow-hidden rounded-lg shadow-lg">
<div class="flex-shrink-0 w-full h-64 bg-white bg-opacity-30 backdrop-blur-md border border-transparent rounded-lg dark:bg-gray-800">
<img class="w-full h-full object-cover rounded-lg" src="https://picsum.photos/800/400?random=1" alt="Carousel Slide 1">
<div class="absolute inset-0 flex items-center justify-center text-white opacity-80 text-2xl">Slide 1</div>
</div>
<div class="flex-shrink-0 w-full h-64 bg-white bg-opacity-30 backdrop-blur-md border border-transparent rounded-lg dark:bg-gray-800">
<img class="w-full h-full object-cover rounded-lg" src="https://picsum.photos/800/400?random=2" alt="Carousel Slide 2">
<div class="absolute inset-0 flex items-center justify-center text-white opacity-80 text-2xl">Slide 2</div>
</div>
<div class="flex-shrink-0 w-full h-64 bg-white bg-opacity-30 backdrop-blur-md border border-transparent rounded-lg dark:bg-gray-800">
<img class="w-full h-full object-cover rounded-lg" src="https://picsum.photos/800/400?random=3" alt="Carousel Slide 3">
<div class="absolute inset-0 flex items-center justify-center text-white opacity-80 text-2xl">Slide 3</div>
</div>
</div>
<div class="flex justify-center mt-4">
<button class="px-4 py-2 mx-1 text-sm font-semibold text-white bg-blue-500 rounded-full hover:bg-blue-600 dark:bg-blue-700 dark:hover:bg-blue-600">Previous</button>
<button class="px-4 py-2 mx-1 text-sm font-semibold text-white bg-blue-500 rounded-full hover:bg-blue-600 dark:bg-blue-700 dark:hover:bg-blue-600">Next</button>
</div>
<div class="mt-4 flex justify-around">
<div class="p-4 bg-white bg-opacity-30 backdrop-blur-md border border-transparent rounded-lg dark:bg-gray-800">
<img class="h-12 w-12 rounded-full" src="https://randomuser.me/api/portraits/men/1.jpg" alt="Avatar 1">
<p class="text-center text-white mt-2">Author 1</p>
</div>
<div class="p-4 bg-white bg-opacity-30 backdrop-blur-md border border-transparent rounded-lg dark:bg-gray-800">
<img class="h-12 w-12 rounded-full" src="https://randomuser.me/api/portraits/women/1.jpg" alt="Avatar 2">
<p class="text-center text-white mt-2">Author 2</p>
</div>
<div class="p-4 bg-white bg-opacity-30 backdrop-blur-md border border-transparent rounded-lg dark:bg-gray-800">
<img class="h-12 w-12 rounded-full" src="https://randomuser.me/api/portraits/men/2.jpg" alt="Avatar 3">
<p class="text-center text-white mt-2">Author 3</p>
</div>
</div>
</div>
相关组件
轮播滑块组件
使用配色方案“互补 - 色轮上彼此相对的颜色”和复杂程度“复杂 - 具有多个交互元素的丰富界面”,用于使用 Tailwind CSS 实现设计样式“Neumorphism - 一种柔和 UI 样式,使用微妙的阴影创建似乎从背景中凸出的元素”的 Web 组件轮播滑块组件,目的是“投资组合 - 用于展示工作或产品”。创建支持深色主题的响应式设计。不需要 JavaScript 代码,只需要带有 Tailwind 类的 HTML。对于深色模式,请使用 Tailwind 的 dark: 前缀进行样式设置。如果需要图像,请使用 picsum.photos 获取图像,将 randomuser.me 用于头像。