HTML 代码
<div class="bg-gray-800 text-white p-6 rounded-lg shadow-lg max-w-lg mx-auto">
<div class="text-center mb-4">
<h2 class="text-3xl font-bold">Infographic Title</h2>
<p class="text-gray-400">Engaging insights and data visualizations</p>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div class="bg-gradient-to-r from-purple-500 to-blue-500 p-4 rounded-lg shadow-lg transform transition-transform duration-300 hover:scale-105">
<h3 class="font-semibold text-xl">Key Insight #1</h3>
<img src="https://picsum.photos/id/1018/400/300" alt="Infographic" class="rounded-lg my-2 shadow-md"/>
<p class="text-gray-200">Details about the first key insight go here. It should be engaging and informative.</p>
</div>
<div class="bg-gradient-to-r from-green-400 to-teal-500 p-4 rounded-lg shadow-lg transform transition-transform duration-300 hover:scale-105">
<h3 class="font-semibold text-xl">Key Insight #2</h3>
<img src="https://picsum.photos/id/1015/400/300" alt="Infographic" class="rounded-lg my-2 shadow-md"/>
<p class="text-gray-200">Details about the second key insight go here. Make it intriguing!</p>
</div>
</div>
<div class="mt-6">
<h3 class="text-lg font-semibold">Join the Conversation</h3>
<div class="flex items-center mt-2">
<img src="https://randomuser.me/api/portraits/men/1.jpg" alt="Avatar" class="w-10 h-10 rounded-full mr-2" />
<input type="text" placeholder="Share your thoughts..." class="bg-gray-700 text-white rounded-full py-2 px-4 w-full" />
</div>
<button class="mt-2 bg-blue-600 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-full inline-flex items-center">Submit</button>
</div>
</div>
<style>
@media (prefers-color-scheme: dark) {
.bg-gray-800 {
background-color: #1c1c1c;
}
.bg-gradient-to-r {
background-image: linear-gradient(to right, #6a0dad, #1e90ff);
}
}
</style>
相关组件
信息图表组件
一个复杂的信息图表组件,具有拟物化设计风格和充满活力的配色方案,适用于电子商务平台。它是响应式的,并支持使用 Tailwind CSS 的深色模式。它通过交互式元素显示各种产品统计信息。
复古图表组件
一个响应式信息图表组件,具有复古/复古设计、柔和的配色方案和深色模式支持。使用 Tailwind CSS 进行样式设置,并包含多个交互式元素,用于适合博客和内容使用的复杂界面。包括时间线、进度条、图表和号召性用语,均采用 80 年代/90 年代美学和柔和色彩的风格。将 picsum.photos 和 randomuser.me 中的随机图像用于头像。