Toggle navigation
☰
HTML
CSS
Scripting
Database
<!doctype html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Tailwind CSS Masonry Gallery</title> <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4.2.1"></script> </head> <body class="bg-gray-50 flex justify-center min-h-screen pt-24 p-6 antialiased"> <div class="max-w-7xl w-full space-y-12"> <div class="flex items-end justify-between border-b border-slate-100 pb-8"> <div> <span class="text-[10px] font-black text-indigo-600 uppercase tracking-[0.4em]">Grid Layout 0.2</span> <h2 class="text-4xl font-black text-slate-900 tracking-tight">Kinetic Masonry</h2> </div> <p class="text-sm font-bold text-slate-400 uppercase tracking-widest hidden md:block">32 Verified Assets</p> </div> <div class="columns-1 sm:columns-2 lg:columns-3 xl:columns-4 gap-8"> <!-- Item 1: Wide --> <div class="break-inside-avoid mb-8 rounded-[2.5rem] overflow-hidden shadow-sm hover:shadow-2xl transition-all duration-500 bg-white"> <img src="https://images.unsplash.com/photo-1451187580459-43490279c0fa?w=800&q=80" class="w-full aspect-video object-cover group-hover:scale-105 transition-transform cursor-pointer"> </div> <!-- Item 2: Portrait --> <div class="break-inside-avoid mb-8 rounded-[2.5rem] overflow-hidden shadow-sm hover:shadow-2xl transition-all duration-500 bg-white"> <img src="https://images.unsplash.com/photo-1550751827-4bd374c3f58b?w=800&q=80" class="w-full aspect-[3/4] object-cover hover:scale-105 transition-transform cursor-pointer"> </div> <!-- Item 3: Square --> <div class="break-inside-avoid mb-8 rounded-[2.5rem] overflow-hidden shadow-sm hover:shadow-2xl transition-all duration-500 bg-white"> <img src="https://plus.unsplash.com/premium_photo-1681426687411-21986b0626a8?w=800&q=80" class="w-full aspect-square object-cover hover:scale-105 transition-transform cursor-pointer"> </div> <!-- Item 4: Wide --> <div class="break-inside-avoid mb-8 rounded-[2.5rem] overflow-hidden shadow-sm hover:shadow-2xl transition-all duration-500 bg-white"> <img src="https://images.unsplash.com/photo-1518770660439-4636190af475?w=800&q=80" class="w-full aspect-video object-cover hover:scale-105 transition-transform cursor-pointer"> </div> <!-- Item 5: Landscape (Replaced Tall Image) --> <div class="break-inside-avoid mb-8 rounded-[2.5rem] overflow-hidden shadow-sm hover:shadow-2xl transition-all duration-500 bg-white"> <img src="https://images.unsplash.com/photo-1563986768609-322da13575f3?w=800&q=80" class="w-full aspect-[4/3] object-cover hover:scale-105 transition-transform cursor-pointer"> </div> <!-- Item 6: Tall --> <div class="break-inside-avoid mb-8 rounded-[2.5rem] overflow-hidden shadow-sm hover:shadow-2xl transition-all duration-500 bg-white"> <img src="https://images.unsplash.com/photo-1542744173-8e7e53415bb0?w=800&q=80" class="w-full aspect-[2/3] object-cover hover:scale-105 transition-transform cursor-pointer"> </div> <!-- Item 7: Square --> <div class="break-inside-avoid mb-8 rounded-[2.5rem] overflow-hidden shadow-sm hover:shadow-2xl transition-all duration-500 bg-white"> <img src="https://images.unsplash.com/photo-1526170375885-4d8ecf77b99f?w=800&q=80" class="w-full aspect-square object-cover hover:scale-105 transition-transform cursor-pointer"> </div> <!-- Item 8: Wide --> <div class="break-inside-avoid mb-8 rounded-[2.5rem] overflow-hidden shadow-sm hover:shadow-2xl transition-all duration-500 bg-white"> <img src="https://images.unsplash.com/photo-1551288049-bebda4e38f71?w=800&q=80" class="w-full aspect-video object-cover hover:scale-105 transition-transform cursor-pointer"> </div> </div> </div> </body> </html>