o1-mini-2024-09-12· OpenAI
WildChat-4.8M (AI2)
<p> </p> <style> @import…
- User
/* کلیات صفحه */ * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Vazirmatn', sans-serif; } body { background: linear-gradient(135deg, #f5f7fa, #c3cfe2); min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 0; direction: rtl; } .unique-start-button-container { width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; margin-bottom: 1rem; } .unique-start-button { background: radial-gradient(circle at 50% 50%, #f77062, #fe5196); color: white; border-radius: 25px; padding: 20px 70px; text-align: center; display: inline-flex; align-items: center; justify-content: center; font-weight: bold; box-shadow: rgba(0, 0, 0, 0.3) 4px 4px 15px, rgba(255, 255, 255, 0.4) -4px -4px 15px; cursor: pointer; border: none; text-decoration: none; transition: transform 0.3s ease, background 0.3s ease; overflow: hidden; font-size: 1.3rem; z-index: 1000; } .unique-start-button:hover { transform: scale(1.05); } .unique-start-button:active { transform: scale(0.98); } .unique-start-button .start-icon { width: 28px; height: 28px; margin-right: 12px; animation: rotateIcon 2s linear infinite; display: flex; align-items: center; justify-content: center; } .analysis-buttons { display: none; flex-direction: column; gap: 1rem; margin-top: 1rem; } .analysis-button { background: radial-gradient(circle at 50% 50%, #4CAF50, #45a049); color: white; border-radius: 20px; padding: 15px 50px; text-align: center; display: inline-flex; align-items: center; justify-content: center; font-weight: bold; box-shadow: rgba(0, 0, 0, 0.3) 4px 4px 15px; cursor: pointer; border: none; text-decoration: none; transition: transform 0.3s ease; font-size: 1rem; } .analysis-button.advanced { background: radial-gradient(circle at 50% 50%, #2196F3, #1976D2); } .analysis-button:hover { transform: scale(1.05); } @keyframes rotateIcon { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } .unique-start-button svg { fill: white; width: 100%; height: 100%; } .hero-section { text-align: center; margin-bottom: 3rem; padding: 2rem; background: rgba(255, 255, 255, 0.9); border-radius: 20px; box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15); max-width: 800px; width: 100%; } .hero-title { color: #2d3748; font-size: 2.5rem; margin-bottom: 1rem; background: linear-gradient(45deg, #3490dc, #6574cd); -webkit-background-clip: text; -webkit-text-fill-color: transparent; } .hero-section p { color: #4a5568; font-size: 1.1rem; } .faq-container { max-width: 800px; width: 100%; background: white; border-radius: 20px; box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15); overflow: hidden; margin-bottom: 2rem; } .faq-item { border-bottom: 1px solid #e2e8f0; } .faq-item:last-child { border-bottom: none; } .faq-question { padding: 1.5rem; width: 100%; text-align: right; background: none; border: none; font-size: 1.1rem; font-weight: 500; color: #2d3748; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: all 0.3s ease; } .faq-question:hover { background: #f7fafc; color: #3182ce; } .faq-question.active { background: #f0f4f8; color: #3182ce; } .faq-answer { max-height: 0; overflow: hidden; transition: all 0.3s ease; background: #f8fafc; padding: 0 1.5rem; } .faq-answer.active { max-height: 300px; padding: 1.5rem; } .faq-answer p { color: #4a5568; line-height: 1.6; } .icon { transition: transform 0.3s ease; } .faq-question.active .icon { transform: rotate(180deg); } @media (max-width: 768px) { .hero-title { font-size: 2rem; } .faq-question { font-size: 1rem; padding: 1rem; } .faq-answer.active { padding: 1rem; } .unique-start-button { padding: 15px 40px; font-size: 1.1rem; } .unique-start-button .start-icon { width: 24px; height: 24px; } } </style>// اضافه کردن event listener برای دکمه شروع startButton.addEventListener('click', () => { analysisButtons.style.display = 'flex'; startButton.style.display = 'none'; }); faqQuestions.forEach(question => { question.addEventListener('click', () => { const answer = question.nextElementSibling; const isActive = question.classList.contains('active'); // بستن سایر سوالات faqQuestions.forEach(q => { q.classList.remove('active'); q.nextElementSibling.classList.remove('active'); }); // باز یا بسته کردن سوال کلیک شده if (!isActive) { question.classList.add('active'); answer.classList.add('active'); } }); });* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Vazirmatn', sans-serif; } body { background: linear-gradient(135deg, #f5f7fa, #c3cfe2); min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 2rem 1rem; } .unique-start-button-container { width: 100%; max-width: 600px; display: flex; flex-direction: column; align-items: center; margin-bottom: 2rem; perspective: 1000px; } .unique-start-button { background: radial-gradient(circle at 50% 50%, #f77062, #fe5196); color: white; border-radius: 25px; padding: 20px 70px; font-size: 1.3rem; font-weight: bold; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 12px; position: relative; overflow: hidden; transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); box-shadow: 0 10px 30px rgba(254, 81, 150, 0.3), inset 0 -3px 0 rgba(0, 0, 0, 0.1); transform-style: preserve-3d; } .unique-start-button::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient( 90deg, transparent, rgba(255, 255, 255, 0.4), transparent ); animation: shimmer 3s infinite; } .unique-start-button:hover { transform: translateY(-5px) rotateX(10deg); box-shadow: 0 20px 40px rgba(254, 81, 150, 0.4), inset 0 -3px 0 rgba(0, 0, 0, 0.2); } .unique-start-button:active { transform: translateY(2px); box-shadow: 0 5px 15px rgba(254, 81, 150, 0.4); } .start-icon { width: 28px; height: 28px; position: relative; animation: rotateIcon 3s linear infinite; } .start-icon svg { width: 100%; height: 100%; fill: white; } .analysis-buttons { width: 100%; display: none; flex-direction: column; gap: 1.5rem; opacity: 0; transform: translateY(20px) scale(0.95); transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1); } .analysis-buttons.visible { display: flex; opacity: 1; transform: translateY(0) scale(1); } .analysis-button { width: 100%; padding: 18px 40px; border-radius: 15px; border: none; font-size: 1.1rem; font-weight: 500; color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 12px; position: relative; overflow: hidden; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); transform-style: preserve-3d; --x: 0; --y: 0; } .analysis-button:first-child { background: linear-gradient(135deg, #43cea2, #185a9d); box-shadow: 0 8px 20px rgba(67, 206, 162, 0.3), inset 0 -2px 0 rgba(0, 0, 0, 0.1); } .analysis-button:last-child { background: linear-gradient(135deg, #834d9b, #d04ed6); box-shadow: 0 8px 20px rgba(131, 77, 155, 0.3), inset 0 -2px 0 rgba(0, 0, 0, 0.1); } .analysis-button::before { content: ''; position: absolute; inset: 0; background: linear-gradient( 90deg, transparent, rgba(255, 255, 255, 0.2), transparent ); transform: translateX(-100%); transition: transform 0.6s ease; } .analysis-button:hover { transform: translateY(-3px) scale(1.02); filter: brightness(1.1); } .analysis-button:hover::before { transform: translateX(100%); } .analysis-button:active { transform: translateY(2px) scale(0.98); } /* Ripple Effect Styles */ .analysis-button::after { content: ''; position: absolute; width: 100px; height: 100px; background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 70%); transform: translate(-50%, -50%); left: var(--x); top: var(--y); opacity: 0; transition: opacity 0.3s; pointer-events: none; } .analysis-button:hover::after { opacity: 0.3; } .hero-section { text-align: center; margin-bottom: 3rem; padding: 2.5rem; background: rgba(255, 255, 255, 0.95); border-radius: 20px; box-shadow: 0 15px 35px rgba(31, 38, 135, 0.15); max-width: 800px; width: 100%; transform: translateY(-20px); opacity: 0; animation: heroAppear 1s cubic-bezier(0.4, 0, 0.2, 1) forwards; backdrop-filter: blur(10px); } .hero-title { color: transparent; font-size: 2.5rem; margin-bottom: 1.5rem; background: linear-gradient(45deg, #3490dc, #6574cd); -webkit-background-clip: text; background-clip: text; position: relative; display: inline-block; } .hero-title::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 100%; height: 3px; background: linear-gradient(45deg, #3490dc, #6574cd); transform: scaleX(0); transform-origin: right; animation: titleUnderline 1s ease-out 0.5s forwards; } .hero-section p { color: #4a5568; font-size: 1.1rem; opacity: 0; animation: fadeIn 0.8s ease-out 1s forwards; } .faq-container { max-width: 800px; width: 100%; background: white; border-radius: 20px; box-shadow: 0 15px 35px rgba(31, 38, 135, 0.15); overflow: hidden; margin-bottom: 2rem; opacity: 0; transform: translateY(20px); animation: faqAppear 1s cubic-bezier(0.4, 0, 0.2, 1) 0.5s forwards; } .faq-item { border-bottom: 1px solid #e2e8f0; } .faq-item:last-child { border-bottom: none; } .faq-question { padding: 1.5rem; width: 100%; text-align: right; background: none; border: none; font-size: 1.1rem; font-weight: 500; color: #2d3748; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: all 0.3s ease; } .faq-question:hover { background: #f7fafc; color: #3182ce; padding-right: 2rem; } .faq-question.active { background: #f0f4f8; color: #3182ce; } .icon { transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); font-size: 1.2rem; } .faq-question.active .icon { transform: rotate(180deg); } .faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1); background: #f8fafc; padding: 0 1.5rem; opacity: 0; } .faq-answer.active { max-height: 300px; padding: 1.5rem; opacity: 1; } .faq-answer p { color: #4a5568; line-height: 1.6; } .video-container { width: 100%; max-width: 600px; margin: 0 auto; border-radius: 10px; overflow: hidden; box-shadow: 0 8px 16px rgba(0,0,0,0.1); } .video-container video { width: 100%; height: auto; display: block; } @keyframes rotateIcon { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } @keyframes shimmer { 100% { transform: translateX(100%); } } @keyframes buttonsAppear { from { opacity: 0; transform: translateY(20px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } } @keyframes heroAppear { to { opacity: 1; transform: translateY(0); } } @keyframes titleUnderline { to { transform: scaleX(1); } } @keyframes fadeIn { to { opacity: 1; } } @keyframes faqAppear { to { opacity: 1; transform: translateY(0); } } @keyframes ripple { from { transform: translate(-50%, -50%) scale(0); opacity: 1; } to { transform: translate(-50%, -50%) scale(4); opacity: 0; } } @media (max-width: 768px) { .hero-title { font-size: 2rem; } .unique-start-button { padding: 15px 40px; font-size: 1.1rem; } .analysis-button { padding: 15px 30px; font-size: 1rem; } .hero-section { padding: 1.5rem; } .faq-question { font-size: 1rem; padding: 1.2rem; } .faq-answer.active { padding: 1.2rem; } } </style>buttons.forEach(button => { // ایجاد افکت موج هنگام کلیک button.addEventListener('click', function(e) { let ripple = document.createElement('span'); ripple.style.position = 'absolute'; ripple.style.background = 'rgba(255, 255, 255, 0.7)'; ripple.style.transform = 'translate(-50%, -50%)'; ripple.style.pointerEvents = 'none'; ripple.style.borderRadius = '50%'; ripple.style.animationName = 'ripple'; ripple.style.animationDuration = '1s'; ripple.style.animationFillMode = 'forwards'; const rect = this.getBoundingClientRect(); const size = Math.max(rect.width, rect.height); ripple.style.width = ripple.style.height = size + 'px'; ripple.style.left = (e.clientX - rect.left) + 'px'; ripple.style.top = (e.clientY - rect.top) + 'px'; this.appendChild(ripple); setTimeout(() => ripple.remove(), 1000); }); // افکت hover پیشرفته button.addEventListener('mousemove', function(e) { const rect = this.getBoundingClientRect(); const x = e.clientX - rect.left; const y = e.clientY - rect.top; this.style.setProperty('--x', `${x}px`); this.style.setProperty('--y', `${y}px`); }); }); } // تابع برای اضافه کردن انیمیشن به FAQ function initFAQ() { const faqQuestions = document.querySelectorAll('.faq-question'); faqQuestions.forEach(question => { question.addEventListener('click', () => { const answer = question.nextElementSibling; const isActive = question.classList.contains('active'); // بستن همه سوالات فعال faqQuestions.forEach(q => { q.classList.remove('active'); q.nextElementSibling.classList.remove('active'); }); // باز کردن سوال کلیک شده if (!isActive) { question.classList.add('active'); answer.classList.add('active'); // اضافه کردن انیمیشن اسکرول answer.scrollIntoView({ behavior: 'smooth', block: 'nearest' }); } }); }); } // تابع برای انیمیشن دکمه شروع function initStartButton() { const startButton = document.getElementById('startButton'); const analysisButtons = document.getElementById('analysisButtons'); startButton.addEventListener('click', () => { // انیمیشن محو شدن دکمه شروع startButton.classList.add('clicked'); setTimeout(() => { startButton.style.display = 'none'; // نمایش دکمههای تحلیل با انیمیشن analysisButtons.classList.add('visible'); }, 400); // زمان انیمیشن تراسانسفر برابر با زمان تنظیم شده در CSS (0.4s) }); // اضافه کردن افکت hover سهبعدی startButton.addEventListener('mousemove', function(e) { const rect = this.getBoundingClientRect(); const x = e.clientX - rect.left; const y = e.clientY - rect.top; const centerX = rect.width / 2; const centerY = rect.height / 2; const angleX = (y - centerY) / 20; const angleY = (centerX - x) / 20; this.style.transform = `perspective(1000px) rotateX(${angleX}deg) rotateY(${angleY}deg) scale(1.05)`; }); startButton.addEventListener('mouseleave', function() { this.style.transform = 'perspective(1000px) rotateX(0) rotateY(0) scale(1)'; }); } // اضافه کردن انیمیشن به اسکرول صفحه function addScrollAnimations() { const sections = document.querySelectorAll('.hero-section, .faq-container'); const observer = new IntersectionObserver((entries) => { entries.forEach(entry => { if (entry.isIntersecting) { entry.target.style.opacity = '1'; entry.target.style.transform = 'translateY(0)'; observer.unobserve(entry.target); // توقف مشاهده پس از فعال شدن } }); }, { threshold: 0.1 }); sections.forEach(section => observer.observe(section)); } // راهاندازی همه توابع هنگام لود صفحه document.addEventListener('DOMContentLoaded', () => { initStartButton(); addButtonAnimations(); initFAQ(); addScrollAnimations(); // اضافه کردن انیمیشنهای اضافی به المانهای صفحه document.querySelectorAll('.hero-title').forEach(title => { title.style.opacity = '0'; title.style.transform = 'translateY(-20px)'; setTimeout(() => { title.style.opacity = '1'; title.style.transform = 'translateY(0)'; }, 300); }); }); </script> - Assistant
با کمال میل! در ادامه یک کد کامل برای شما آماده کردهام که شامل دکمههای تحلیل ابتدایی تصاویر و تحلیل پیشرفته تصاویر با طراحی زیباتر و انیمیشنهای منحصر به فرد برای هر کدام است. این کد از دو نسخهای که شما ارسال کردید الهام گرفته شده و بهینهسازی شده است.
توضیحات کلی:
- دکمههای تحلیل: هر دکمه دارای گرادیان رنگی متفاوت و انیمیشنهای خاص خود هنگام هاور و کلیک است.
- انیمیشنهای اختصاصی: دکمههای تحلیل هنگام هاور دارای افکتهای گرادیان و انیمیشنهای موج هستند.
- ساختار هماهنگ: تمام بخشها از جمله دکمه شروع، بخش هیرو و سوالات به صورت هماهنگ و با طراحی پاسخگو (Responsive) تنظیم شدهاند.
کد کامل:
<!DOCTYPE html> <html lang="fa"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>ربات تحلیل تصاویر هوشمند</title> <link href="https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;700&display=swap" rel="stylesheet"> <style> /* کلیات صفحه */ * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Vazirmatn', sans-serif; } body { background: linear-gradient(135deg, #f5f7fa, #c3cfe2); min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 2rem 1rem; direction: rtl; } /* کانتینر دکمه شروع و دکمههای تحلیل */ .unique-start-button-container { width: 100%; max-width: 600px; display: flex; flex-direction: column; align-items: center; margin-bottom: 2rem; perspective: 1000px; } /* دکمه شروع */ .unique-start-button { background: radial-gradient(circle at 50% 50%, #f77062, #fe5196); color: white; border-radius: 25px; padding: 20px 70px; font-size: 1.3rem; font-weight: bold; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 12px; position: relative; overflow: hidden; transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); box-shadow: 0 10px 30px rgba(254, 81, 150, 0.3), inset 0 -3px 0 rgba(0, 0, 0, 0.1); transform-style: preserve-3d; } .unique-start-button::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient( 90deg, transparent, rgba(255, 255, 255, 0.4), transparent ); animation: shimmer 3s infinite; } .unique-start-button:hover { transform: translateY(-5px) rotateX(10deg); box-shadow: 0 20px 40px rgba(254, 81, 150, 0.4), inset 0 -3px 0 rgba(0, 0, 0, 0.2); } .unique-start-button:active { transform: translateY(2px); box-shadow: 0 5px 15px rgba(254, 81, 150, 0.4); } .start-icon { width: 28px; height: 28px; position: relative; animation: rotateIcon 3s linear infinite; } .start-icon svg { width: 100%; height: 100%; fill: white; } /* دکمههای تحلیل */ .analysis-buttons { width: 100%; display: none; flex-direction: column; gap: 1.5rem; opacity: 0; transform: translateY(20px) scale(0.95); transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1); } .analysis-buttons.visible { display: flex; opacity: 1; transform: translateY(0) scale(1); } .analysis-button { width: 100%; padding: 18px 40px; border-radius: 15px; border: none; font-size: 1.1rem; font-weight: 500; color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 12px; position: relative; overflow: hidden; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); transform-style: preserve-3d; --x: 0; --y: 0; } /* دکمه تحلیل ابتدایی */ .analysis-button.basic { background: linear-gradient(135deg, #43cea2, #185a9d); box-shadow: 0 8px 20px rgba(67, 206, 162, 0.3), inset 0 -2px 0 rgba(0, 0, 0, 0.1); } /* دکمه تحلیل پیشرفته */ .analysis-button.advanced { background: linear-gradient(135deg, #834d9b, #d04ed6); box-shadow: 0 8px 20px rgba(131, 77, 155, 0.3), inset 0 -2px 0 rgba(0, 0, 0, 0.1); } .analysis-button::before { content: ''; position: absolute; inset: 0; background: linear-gradient( 90deg, transparent, rgba(255, 255, 255, 0.2), transparent ); transform: translateX(-100%); transition: transform 0.6s ease; } .analysis-button:hover { transform: translateY(-3px) scale(1.02); filter: brightness(1.1); } .analysis-button:hover::before { transform: translateX(100%); } .analysis-button:active { transform: translateY(2px) scale(0.98); } /* افکت موج هنگام کلیک */ .analysis-button::after { content: ''; position: absolute; width: 100px; height: 100px; background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 70%); transform: translate(-50%, -50%) scale(0); opacity: 0; pointer-events: none; border-radius: 50%; } .analysis-button:focus::after { animation: ripple 0.6s linear; } /* انیمیشنهای دکمهها */ @keyframes rotateIcon { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } @keyframes shimmer { 100% { transform: translateX(100%); } } @keyframes ripple { from { transform: translate(-50%, -50%) scale(0); opacity: 1; } to { transform: translate(-50%, -50%) scale(4); opacity: 0; } } /* بخش هیرو */ .hero-section { text-align: center; margin-bottom: 3rem; padding: 2.5rem; background: rgba(255, 255, 255, 0.95); border-radius: 20px; box-shadow: 0 15px 35px rgba(31, 38, 135, 0.15); max-width: 800px; width: 100%; transform: translateY(-20px); opacity: 0; animation: heroAppear 1s cubic-bezier(0.4, 0, 0.2, 1) forwards; backdrop-filter: blur(10px); } .hero-title { color: transparent; font-size: 2.5rem; margin-bottom: 1.5rem; background: linear-gradient(45deg, #3490dc, #6574cd); -webkit-background-clip: text; background-clip: text; position: relative; display: inline-block; } .hero-title::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 100%; height: 3px; background: linear-gradient(45deg, #3490dc, #6574cd); transform: scaleX(0); transform-origin: right; animation: titleUnderline 1s ease-out 0.5s forwards; } .hero-section p { color: #4a5568; font-size: 1.1rem; opacity: 0; animation: fadeIn 0.8s ease-out 1s forwards; } /* بخش سوالات */ .faq-container { max-width: 800px; width: 100%; background: white; border-radius: 20px; box-shadow: 0 15px 35px rgba(31, 38, 135, 0.15); overflow: hidden; margin-bottom: 2rem; opacity: 0; transform: translateY(20px); animation: faqAppear 1s cubic-bezier(0.4, 0, 0.2, 1) 0.5s forwards; } .faq-item { border-bottom: 1px solid #e2e8f0; } .faq-item:last-child { border-bottom: none; } .faq-question { padding: 1.5rem; width: 100%; text-align: right; background: none; border: none; font-size: 1.1rem; font-weight: 500; color: #2d3748; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: all 0.3s ease; } .faq-question:hover { background: #f7fafc; color: #3182ce; padding-right: 2rem; } .faq-question.active { background: #f0f4f8; color: #3182ce; } .icon { transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); font-size: 1.2rem; } .faq-question.active .icon { transform: rotate(180deg); } .faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1); background: #f8fafc; padding: 0 1.5rem; opacity: 0; } .faq-answer.active { max-height: 300px; padding: 1.5rem; opacity: 1; } .faq-answer p { color: #4a5568; line-height: 1.6; } /* کانتینر ویدیو */ .video-container { width: 100%; max-width: 600px; margin: 0 auto; border-radius: 10px; overflow: hidden; box-shadow: 0 8px 16px rgba(0,0,0,0.1); } .video-container video { width: 100%; height: auto; display: block; } /* انیمیشنهای صفحه */ @keyframes heroAppear { to { opacity: 1; transform: translateY(0); } } @keyframes titleUnderline { to { transform: scaleX(1); } } @keyframes fadeIn { to { opacity: 1; } } @keyframes faqAppear { to { opacity: 1; transform: translateY(0); } } /* انیمیشن ripple */ @keyframes ripple { from { transform: translate(-50%, -50%) scale(0); opacity: 1; } to { transform: translate(-50%, -50%) scale(4); opacity: 0; } } /* Media Queries برای موبایل */ @media (max-width: 768px) { .hero-title { font-size: 2rem; } .unique-start-button { padding: 15px 40px; font-size: 1.1rem; } .analysis-button { padding: 15px 30px; font-size: 1rem; } .hero-section { padding: 1.5rem; } .faq-question { font-size: 1rem; padding: 1.2rem; } .faq-answer.active { padding: 1.2rem; } } </style> </head> <body> <!-- دکمه شروع و دکمههای تحلیل --> <div class="unique-start-button-container"> <button id="startButton" class="unique-start-button"> شروع <span class="start-icon"> <svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg"> <path d="M32 2C17.664 2 6 13.664 6 28c0 14.336 11.664 26 26 26s26-11.664 26-26C58 13.664 46.336 2 32 2zm0 48c-11.046 0-20-8.954-20-20S20.954 10 32 10s20 8.954 20 20-8.954 20-20 20z"></path> <path d="M32 16a16 16 0 100 32 16 16 0 000-32z"></path> <path d="M32 24a8 8 0 100 16 8 8 0 000-16z"></path> </svg> </span> </button> <div id="analysisButtons" class="analysis-buttons"> <button class="analysis-button basic">تحلیل ابتدایی تصاویر</button> <button class="analysis-button advanced">تحلیل پیشرفته تصاویر</button> </div> </div> <!-- بخش هیرو --> <div class="hero-section"> <h1 class="hero-title">ربات تحلیل تصاویر هوشمند</h1> <p>با استفاده از تکنولوژی پیشرفته هوش مصنوعی</p> </div> <!-- بخش سوالات --> <div class="faq-container" id="faq-container"> <div class="faq-item"> <button class="faq-question"> <span>🤖 این ربات چه کاری انجام میدهد؟</span> <span class="icon">▼</span> </button> <div class="faq-answer"> <p>این ربات با استفاده از تکنولوژی پیشرفته هوش مصنوعی، قابلیت تحلیل تصاویر را دارد. شما میتوانید تصویر مورد نظر خود را آپلود کرده و از ربات بخواهید توضیحات مربوط به آن را ارائه دهد. همچنین میتوانید اسکرینشاتهای خود را به کد تبدیل کنید و از خلاقیتهای بیپایان این ربات بهرهمند شوید.</p> </div> </div> <div class="faq-item"> <button class="faq-question"> <span>🎥 آموزش استفاده از ربات</span> <span class="icon">▼</span> </button> <div class="faq-answer"> <div class="video-container"> <video width="300" height="150" controls="controls" controlslist="nodownload"> <source src="https://uploadkon.ir/uploads/695002_24Screenrecorder-2024-11-02-16-25-31-317.mp4" type="video/mp4" /> مرورگر شما از پخش ویدیو پشتیبانی نمیکند. </video> </div> </div> </div> <div class="faq-item"> <button class="faq-question"> <span>📝 آیا ربات از زبان فارسی پشتیبانی میکند؟</span> <span class="icon">▼</span> </button> <div class="faq-answer"> <p>بله، هر دو ربات تحلیل تصاویر از متن فارسی پشتیبانی میکنند. در صورتی که ربات توضیحات را به انگلیسی ارائه دهد، کافیست از آن بخواهید متن را به فارسی ترجمه کند.</p> </div> </div> </div> <!-- اسکریپتها --> <script> document.addEventListener('DOMContentLoaded', () => { const startButton = document.getElementById('startButton'); const analysisButtons = document.getElementById('analysisButtons'); const analysisButtonElements = document.querySelectorAll('.analysis-button'); const faqQuestions = document.querySelectorAll('.faq-question'); // عملکرد دکمه شروع startButton.addEventListener('click', () => { startButton.classList.add('clicked'); setTimeout(() => { startButton.style.display = 'none'; analysisButtons.classList.add('visible'); }, 600); // زمان با توجه به انیمیشن }); // افکت سهبعدی برای دکمه شروع startButton.addEventListener('mousemove', function(e) { const rect = this.getBoundingClientRect(); const x = e.clientX - rect.left; const y = e.clientY - rect.top; const centerX = rect.width / 2; const centerY = rect.height / 2; const angleX = (y - centerY) / 20; const angleY = (centerX - x) / 20; this.style.transform = `perspective(1000px) rotateX(${angleX}deg) rotateY(${angleY}deg) scale(1.05)`; }); startButton.addEventListener('mouseleave', function() { this.style.transform = 'perspective(1000px) rotateX(0) rotateY(0) scale(1)'; }); // انیمیشنهای دکمههای تحلیل analysisButtonElements.forEach(button => { // افکت موج هنگام کلیک button.addEventListener('click', function(e) { let ripple = document.createElement('span'); ripple.style.position = 'absolute'; ripple.style.background = 'rgba(255, 255, 255, 0.7)'; ripple.style.transform = 'translate(-50%, -50%)'; ripple.style.pointerEvents = 'none'; ripple.style.borderRadius = '50%'; ripple.style.animationName = 'ripple'; ripple.style.animationDuration = '0.6s'; ripple.style.animationFillMode = 'forwards'; const rect = this.getBoundingClientRect(); const size = Math.max(rect.width, rect.height); ripple.style.width = ripple.style.height = size + 'px'; ripple.style.left = (e.clientX - rect.left) + 'px'; ripple.style.top = (e.clientY - rect.top) + 'px'; this.appendChild(ripple); setTimeout(() => ripple.remove(), 600); }); // افکت هایور پیشرفته button.addEventListener('mousemove', function(e) { const rect = this.getBoundingClientRect(); const x = e.clientX - rect.left; const y = e.clientY - rect.top; this.style.setProperty('--x', `${x}px`); this.style.setProperty('--y', `${y}px`); }); }); // عملکرد FAQ faqQuestions.forEach(question => { question.addEventListener('click', () => { const answer = question.nextElementSibling; const isActive = question.classList.contains('active'); // بستن تمام سوالات faqQuestions.forEach(q => { q.classList.remove('active'); q.nextElementSibling.classList.remove('active'); }); // باز یا بسته کردن سوال انتخاب شده if (!isActive) { question.classList.add('active'); answer.classList.add('active'); // اسکرول به سوال باز شده answer.scrollIntoView({ behavior: 'smooth', block: 'nearest' }); } }); }); }); </script> </body> </html>ویژگیهای کلیدی این کد:
-
دکمه شروع با افکت چرخش:
- در هنگام هاور روی دکمه شروع، افکت سهبعدی ایجاد میشود که باعث میشود دکمه کمی به سمت جلو جا بیفتد.
- آیکون داخل دکمه چرخش مداومی دارد.
-
دکمههای تحلیل با گرادیانهای متمایز و افکت موج:
- تحلیل ابتدایی تصاویر: دارای گرادیان سبز-آبی و سایهای ملایم است.
- تحلیل پیشرفته تصاویر: دارای گرادیان بنفش-صورتی و سایهای مناسب است.
- هر دو دکمه هنگام کلیک افکت موج (Ripple) دارند که به صورت داینامیک ایجاد و محو میشود.
-
بخش هیرو با انیمیشن ورود:
- عنوان با گرادیان رنگی و خط زیرین جذاب.
- پاراگراف توضیحات با انیمیشن محو شدن.
-
بخش سوالات با امکانات باز و بسته:
- سوالات هنگام کلیک به آرامی باز و بسته میشوند.
- آیکون فلش جهت تغییر جهت نشانگر وضعیت باز یا بسته بودن سوال.
-
واکنشگرایی (Responsive Design):
- طراحی به گونهای است که در نمایشگرهای کوچکتر نیز به خوبی نمایش داده میشود.
-
استفاده از انیمیشنهای CSS:
- انیمیشنهای مختلف برای ایجاد تجربه کاربری پویا و جذاب.
نحوه عملکرد:
- شروع کنید: کاربر ابتدا دکمه شروع را میبیند. با کلیک روی این دکمه، دکمهها تحلیل به صورت انیمیشنی ظاهر میشوند.
- انتخاب تحلیل: کاربر میتواند بین تحلیل ابتدایی و پیشرفته انتخاب کند. هر کدام از این دکمهها دارای گرادیان رنگی و انیمیشنهای مخصوص به خود هستند که تجربه کاربری لذتبخشی را فراهم میکنند.
- FAQ: بخش سوالات متداول به کاربر کمک میکند تا اطلاعات بیشتری درباره عملکرد ربات دریافت کند.
نکات تکمیلی:
- منابع ویدیو: اطمینان حاصل کنید که لینک ویدیو مورد استفاده معتبر و در دسترس است.
- تست مرورگرها: پس از پیادهسازی، صفحه را در مرورگرهای مختلف تست کنید تا از سازگاری و عملکرد صحیح آن مطمئن شوید.
- بهینهسازی برای سرعت: تصاویر و ویدیوها را بهینه کنید تا بارگذاری صفحه سریعتر انجام شود.
امیدوارم این کد به نیازهای شما پاسخ دهد و تجربه کاربری بهتری را برای بازدیدکنندگان وبسایت شما فراهم کند. در صورت نیاز به تغییرات بیشتر یا سوالات دیگر، خوشحال میشوم کمک کنم!