Modern Flat List - MeggiTools
Run
Toggle Theme
Share Link
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Modern Flat List</title> <style> body { font-family: 'Arial', sans-serif; background: #fafafa; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; } .list-container { background: #fff; border-radius: 8px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); overflow: hidden; width: 80%; max-width: 600px; } .list-title { background: #3f51b5; color: #fff; padding: 16px; text-align: center; font-size: 24px; } .list { list-style: none; margin: 0; padding: 0; } .list-item { border-bottom: 1px solid #e0e0e0; display: flex; align-items: center; padding: 16px; transition: background 0.3s; } .list-item:hover { background: #f0f0f0; } .list-item:last-child { border-bottom: none; } .list-item-icon { background: #3f51b5; border-radius: 50%; color: #fff; display: flex; justify-content: center; align-items: center; font-size: 24px; height: 40px; width: 40px; margin-right: 16px; } .list-item-content { flex-grow: 1; } .list-item-title { font-size: 18px; margin: 0; } .list-item-description { color: #757575; font-size: 14px; margin: 4px 0 0; } .list-item-actions { display: flex; align-items: center; } .list-item-action { background: #3f51b5; border: none; border-radius: 6px; color: #fff; cursor: pointer; font-size: 14px; margin-left: 8px; padding: 8px 12px; transition: background 0.3s; } .list-item-action:hover { background: #303f9f; } .fade-in { animation: fadeIn 1s ease-in-out; } @keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } </style> </head> <body> <div class="list-container"> <div class="list-title">Modern Flat List</div> <ul class="list"> <li class="list-item fade-in"> <div class="list-item-icon">📋</div> <div class="list-item-content"> <p class="list-item-title">Task 1</p> <p class="list-item-description">Description for task 1.</p> </div> <div class="list-item-actions"> <button class="list-item-action">Edit</button> <button class="list-item-action">Delete</button> </div> </li> <li class="list-item fade-in"> <div class="list-item-icon">🗂️</div> <div class="list-item-content"> <p class="list-item-title">Task 2</p> <p class="list-item-description">Description for task 2.</p> </div> <div class="list-item-actions"> <button class="list-item-action">Edit</button> <button class="list-item-action">Delete</button> </div> </li> <li class="list-item fade-in"> <div class="list-item-icon">🔍</div> <div class="list-item-content"> <p class="list-item-title">Task 3</p> <p class="list-item-description">Description for task 3.</p> </div> <div class="list-item-actions"> <button class="list-item-action">Edit</button> <button class="list-item-action">Delete</button> </div> </li> </ul> </div> <script> document.addEventListener('DOMContentLoaded', () => { const listItems = document.querySelectorAll('.list-item'); listItems.forEach((item, index) => { setTimeout(() => { item.classList.add('fade-in'); }, index * 100); }); }); </script> </body> </html>