Professional Media Object - 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>Professional Media Object</title> <style> body { font-family: 'Arial', sans-serif; background: #f4f4f9; margin: 0; padding: 0; display: flex; justify-content: center; align-items: center; height: 100vh; } .media-object { display: flex; align-items: flex-start; background: white; border-radius: 10px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); overflow: hidden; width: 600px; transition: transform 0.3s ease, box-shadow 0.3s ease; } .media-object:hover { transform: translateY(-10px); box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); } .media-object img { width: 150px; height: auto; border-right: 1px solid #f4f4f9; } .media-content { padding: 20px; flex-grow: 1; } .media-content h2 { margin: 0 0 10px; font-size: 24px; display: flex; align-items: center; } .media-content h2 span { margin-left: 10px; font-size: 20px; color: #555; } .media-content p { margin: 10px 0; color: #666; line-height: 1.5; } .media-content .icons { display: flex; justify-content: space-between; align-items: center; } .media-content .icons .emoji { font-size: 24px; } .media-content .icons .actions { display: flex; gap: 10px; } .media-content .icons .actions button { background: #007bff; border: none; border-radius: 5px; color: white; padding: 8px 12px; cursor: pointer; transition: background 0.3s ease; } .media-content .icons .actions button:hover { background: #0056b3; } @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } .media-object { animation: fadeIn 1s ease; } </style> </head> <body> <div class="media-object"> <img src="https://via.placeholder.com/150" alt="Media Image"> <div class="media-content"> <h2>Media Title <span>🎉</span></h2> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque et eros vel libero placerat ultricies sit amet in felis.</p> <div class="icons"> <div class="emoji">👍🏻🔥😊</div> <div class="actions"> <button>Like</button> <button>Share</button> </div> </div> </div> </div> <script> document.addEventListener('DOMContentLoaded', function () { const mediaObject = document.querySelector('.media-object'); mediaObject.addEventListener('mouseover', function () { this.style.transform = 'scale(1.05)'; }); mediaObject.addEventListener('mouseout', function () { this.style.transform = 'scale(1)'; }); }); </script> </body> </html>