Toggle navigation
☰
Home
HTML
CSS
Scripting
Database
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Image Thumbnail List</title> <style> /* ========================================================================== Styles for Demo Preview Only ========================================================================== */ body { font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background-color: #f1f5f9; color: #334155; margin: 0; padding: 2rem; display: flex; justify-content: center; } /* ========================================================================== Image Thumbnail List Component Styles - Copy from here ========================================================================== */ .thumbnail-list-template { --thumb-font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; --thumb-primary-text-color: #1e293b; --thumb-secondary-text-color: #64748b; --thumb-accent-color: #0ea5e9; --thumb-bg-color: #ffffff; --thumb-border-color: #e2e8f0; --thumb-hover-bg-color: #f8fafc; --thumb-img-border-radius: .25rem; font-family: var(--thumb-font-family); color: var(--thumb-primary-text-color); width: 100%; max-width: 700px; } .thumbnail-list-template *, .thumbnail-list-template *::before, .thumbnail-list-template *::after { box-sizing: border-box; } .thumbnail-list-template .list-header { text-align: center; margin-bottom: 2rem; } .thumbnail-list-template .list-header h2 { font-size: 1.75rem; margin: 0 0 .25rem 0; } .thumbnail-list { list-style: none; padding: 0; margin: 0; } .thumbnail-item { display: flex; gap: 1.5rem; align-items: flex-start; padding: 1.5rem; background-color: var(--thumb-bg-color); border-bottom: 1px solid var(--thumb-border-color); text-decoration: none; color: inherit; transition: background-color 0.2s ease; } .thumbnail-list li:first-child .thumbnail-item { border-radius: .5rem .5rem 0 0; } .thumbnail-list li:last-child .thumbnail-item { border-bottom: none; border-radius: 0 0 .5rem .5rem; } .thumbnail-list li:only-child .thumbnail-item { border-radius: .5rem; } .thumbnail-item:hover { background-color: var(--thumb-hover-bg-color); color: var(--thumb-accent-color); } .thumbnail-figure { margin: 0; flex-shrink: 0; width: 100px; } @media(min-width: 640px) { .thumbnail-figure { width: 150px; } } .thumbnail-image { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--thumb-img-border-radius); background-color: #e2e8f0; /* Placeholder color */ } .item-content h3 { font-size: 1.2rem; margin: 0 0 .5rem 0; } .item-content .item-description { margin: 0 0 .75rem 0; color: var(--thumb-secondary-text-color); font-size: .9rem; line-height: 1.5; } /* The link hover state affects the description color */ .thumbnail-item:hover .item-description { color: var(--thumb-primary-text-color); } .item-meta { font-size: .8rem; color: var(--thumb-secondary-text-color); text-transform: uppercase; letter-spacing: .5px; } </style> </head> <body> <div class="thumbnail-list-template"> <div class="list-header"> <h2>Acme Peculiar Gadgets</h2> </div> <ul class="thumbnail-list"> <li> <a href="#" class="thumbnail-item"> <figure class="thumbnail-figure"> <img src="https://placehold.co/150x112/0ea5e9/ffffff" alt="The Self-Watering Pet Rock." class="thumbnail-image"> </figure> <div class="item-content"> <h3>The Self-Watering Pet Rock</h3> <p class="item-description">Tired of the constant demands of caring for a standard pet rock? Our patented automated hydration system ensures your geological companion stays perfectly... moist.</p> <div class="item-meta">Home & Garden</div> </div> </a> </li> <li> <a href="#" class="thumbnail-item"> <figure class="thumbnail-figure"> <img src="https://placehold.co/150x112/4f46e5/ffffff" alt="A pair of Dehydrated Water Packets." class="thumbnail-image"> </figure> <div class="item-content"> <h3>Dehydrated Water Packets</h3> <p class="item-description">Perfect for camping and long journeys! Our groundbreaking formula removes all the heavy, inconvenient moisture from H2O. Just add water to rehydrate.</p> <div class="item-meta">Outdoor & Survival</div> </div> </a> </li> <li> <a href="#" class="thumbnail-item"> <figure class="thumbnail-figure"> <img src="https://placehold.co/150x112/16a34a/ffffff" alt="The Inflatable Dartboard." class="thumbnail-image"> </figure> <div class="item-content"> <h3>Inflatable Dartboard</h3> <p class="item-description">All the fun of darts with none of the commitment or risk of property damage. A thrilling game of suspense and gradual deflation. Darts not included.</p> <div class="item-meta">Games & Recreation</div> </div> </a> </li> </ul> </div> </body> </html>