/
varsl
/
HTML-CSS
Обзор
Документация
Войти
/
varsl
/
HTML-CSS
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
frontend/css/animations.css
527 строк
10 KB
varsl
Добавление дополнительных файлов стилей
21 дек 2025, 23:13
21 дек 2025, 23:13
bc07692
Код
Авторство
О чём код?
/* Основные анимации */ @keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } @keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } } @keyframes fadeInDown { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: translateY(0); } } @keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } } @keyframes slideInLeft { from { opacity: 0; transform: translateX(-50px); } to { opacity: 1; transform: translateX(0); } } @keyframes slideInRight { from { opacity: 0; transform: translateX(50px); } to { opacity: 1; transform: translateX(0); } } @keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } } @keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } @keyframes shimmer { 0% { background-position: -200% center; } 100% { background-position: 200% center; } } @keyframes floating { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } } @keyframes typing { from { width: 0; } to { width: 100%; } } @keyframes blink-caret { from, to { border-color: transparent; } 50% { border-color: var(--primary-color); } } @keyframes progress { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } } @keyframes modalFadeIn { from { opacity: 0; transform: scale(0.9) translateY(-20px); } to { opacity: 1; transform: scale(1) translateY(0); } } @keyframes slideIn { from { transform: translateY(-100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } } @keyframes slideInFromRight { from { opacity: 0; transform: translateX(50px); } to { opacity: 1; transform: translateX(0); } } /* ========== АНИМАЦИИ ДЛЯ ЖИВОТНЫХ ========== */ .animal-card { animation: fadeIn 0.5s ease forwards; } .animal-card:nth-child(2) { animation-delay: 0.1s; } .animal-card:nth-child(3) { animation-delay: 0.2s; } .animal-card:nth-child(4) { animation-delay: 0.3s; } .animal-card:nth-child(5) { animation-delay: 0.4s; } .animal-card:nth-child(6) { animation-delay: 0.5s; } /* ========== АНИМАЦИИ ДЛЯ БИЛЕТОВ ========== */ .ticket-option { animation: slideInFromRight 0.5s ease forwards; } .ticket-option:nth-child(2) { animation-delay: 0.1s; } .ticket-option:nth-child(3) { animation-delay: 0.2s; } .ticket-option:nth-child(4) { animation-delay: 0.3s; } .ticket-option:nth-child(5) { animation-delay: 0.4s; } .ticket-option:nth-child(6) { animation-delay: 0.5s; } .step.active .step-number { animation: pulse 2s ease-in-out infinite; } .ticket-count-badge.visible { animation: bounce 0.5s ease; } /* ========== ОСНОВНЫЕ КЛАССЫ АНИМАЦИЙ ========== */ .animate-fade-in { animation: fadeIn 1s ease-out; } .pulse-animation { animation: pulse 2s infinite; } .hover-animation { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); } .hover-animation:hover { transform: translateY(-5px); } .slide-in-left { animation: slideInLeft 0.8s ease-out; } .slide-in-right { animation: slideInRight 0.8s ease-out; } .bounce-animation { animation: bounce 1s infinite; } .rotate-animation { animation: rotate 2s linear infinite; } .shimmer-effect { background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent); background-size: 200% 100%; animation: shimmer 2s infinite; } .fade-in-up { opacity: 0; transform: translateY(30px); animation: fadeInUp 0.6s ease forwards; } .fade-in-down { opacity: 0; transform: translateY(-30px); animation: fadeInDown 0.6s ease forwards; } .delay-100 { animation-delay: 0.1s; } .delay-200 { animation-delay: 0.2s; } .delay-300 { animation-delay: 0.3s; } .delay-400 { animation-delay: 0.4s; } .delay-500 { animation-delay: 0.5s; } .floating { animation: floating 3s ease-in-out infinite; } .typing { overflow: hidden; border-right: 2px solid var(--primary-color); white-space: nowrap; animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite; } .progress-bar { height: 4px; background: linear-gradient(90deg, var(--primary-color), var(--accent-color)); animation: progress 2s ease-in-out infinite; } /* ========== УТИЛИТНЫЕ АНИМАЦИИ ========== */ .loader { width: 50px; height: 50px; border: 5px solid #f3f3f3; border-top: 5px solid var(--primary-color); border-radius: 50%; animation: rotate 1s linear infinite; margin: 2rem auto; } .btn-loading { position: relative; color: transparent !important; } .btn-loading::after { content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 20px; height: 20px; border: 2px solid var(--white); border-top-color: transparent; border-radius: 50%; animation: rotate 1s linear infinite; } .card-hover { transition: all 0.3s ease; } .card-hover:hover { transform: translateY(-8px); box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15); } .zoom-in { transition: transform 0.3s ease; } .zoom-in:hover { transform: scale(1.05); } .ripple { position: relative; overflow: hidden; } .ripple::after { content: ''; position: absolute; width: 100%; height: 100%; top: 0; left: 0; background: radial-gradient(circle, rgba(255,255,255,0.3) 1%, transparent 1%); background-size: 15000% 15000%; background-position: center; opacity: 0; transition: background-size 0.5s, opacity 1s; } .ripple:active::after { background-size: 100% 100%; opacity: 1; transition: 0s; } /* ========== УВЕДОМЛЕНИЯ И МОДАЛЬНЫЕ ОКНА ========== */ .modal.show .modal-content { animation: modalFadeIn 0.3s ease forwards; } .notification { animation: slideIn 0.3s ease forwards; } /* ========== АНИМАЦИИ ДЛЯ УВЕДОМЛЕНИЙ ========== */ @keyframes notificationSlideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } } .notification.show { animation: notificationSlideIn 0.3s ease forwards; } /* ========== АНИМАЦИИ ДЛЯ ЗАГРУЗКИ ========== */ @keyframes skeletonLoading { 0% { background-position: -200px 0; } 100% { background-position: calc(200px + 100%) 0; } } .skeleton { background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); background-size: 200px 100%; animation: skeletonLoading 1.5s infinite; } /* ========== АНИМАЦИИ ДЛЯ КНОПОК ========== */ @keyframes buttonPress { 0% { transform: scale(1); } 50% { transform: scale(0.95); } 100% { transform: scale(1); } } .button-press { animation: buttonPress 0.2s ease; } /* ========== АНИМАЦИИ ДЛЯ ИКОНОК ========== */ @keyframes iconBounce { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.2); } } .icon-bounce:hover { animation: iconBounce 0.3s ease; } /* ========== АНИМАЦИИ ДЛЯ ПОЯВЛЕНИЯ ЭЛЕМЕНТОВ ========== */ @keyframes staggeredFadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } .staggered-item { opacity: 0; animation: staggeredFadeIn 0.5s ease forwards; } .staggered-item:nth-child(1) { animation-delay: 0.1s; } .staggered-item:nth-child(2) { animation-delay: 0.2s; } .staggered-item:nth-child(3) { animation-delay: 0.3s; } .staggered-item:nth-child(4) { animation-delay: 0.4s; } .staggered-item:nth-child(5) { animation-delay: 0.5s; } .staggered-item:nth-child(6) { animation-delay: 0.6s; } /* ========== АНИМАЦИИ ДЛЯ ТЕКСТА ========== */ @keyframes textReveal { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } } .text-reveal { animation: textReveal 1.5s ease forwards; } /* ========== АНИМАЦИИ ДЛЯ ФОНА ========== */ @keyframes backgroundShift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } } .background-animation { background: linear-gradient(45deg, var(--primary-color), var(--accent-color), var(--secondary-color)); background-size: 200% 200%; animation: backgroundShift 10s ease infinite; } /* ========== АНИМАЦИИ ДЛЯ ПРОГРЕСС БАРА ========== */ @keyframes progressWidth { from { width: 0%; } to { width: 100%; } } .progress-animation { animation: progressWidth 2s ease-out; }