Stylish Pin Board - 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>Stylish Pin Board</title> <style> body { font-family: 'Arial', sans-serif; background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%); display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; } .pinboard { background: white; width: 90vw; max-width: 1200px; height: 80vh; border-radius: 15px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); position: relative; overflow: hidden; padding: 20px; } .pinboard-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #f1f1f1; padding-bottom: 10px; } .pinboard-title { font-size: 2rem; color: #333; } .add-pin-button { background: #ff6f61; color: white; border: none; border-radius: 5px; padding: 10px 20px; cursor: pointer; font-size: 1rem; transition: background 0.3s ease; } .add-pin-button:hover { background: #ff3b2f; } .pin { background: #fff; border-radius: 10px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); padding: 15px; margin: 15px 0; position: relative; animation: fadeIn 0.5s ease-in-out; } .pin .delete-pin { background: transparent; border: none; color: #ff6f61; font-size: 1.5rem; position: absolute; top: 10px; right: 10px; cursor: pointer; } .pin .delete-pin:hover { color: #ff3b2f; } .pin-content { margin-top: 10px; } @keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } </style> </head> <body> <div class="pinboard"> <div class="pinboard-header"> <div class="pinboard-title">📌 My PinBoard</div> <button type="button" class="add-pin-button">➕ Add Pin</button> </div> <div class="pins-container"></div> </div> <script> document.querySelector('.add-pin-button').addEventListener('click', () => { const pinContent = prompt('Enter pin content:'); if (pinContent) { const pinContainer = document.querySelector('.pins-container'); const pinElement = document.createElement('div'); pinElement.classList.add('pin'); pinElement.innerHTML = ` <button class="delete-pin">❌</button> <div class="pin-content">${pinContent}</div> `; pinContainer.appendChild(pinElement); pinElement.querySelector('.delete-pin').addEventListener('click', () => { pinContainer.removeChild(pinElement); }); } }); </script> </body> </html>