/
RoditelevVV
/
web-static-labs
Обзор
Документация
Войти
/
RoditelevVV
/
web-static-labs
Код
Запросы
0
Задачи
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
html/lab5/task3/styles.css
266 строк
5 KB
karpov
finish lab3, lab4
12 мар 2026, 08:19
12 мар 2026, 08:19
74cd197
Код
Авторство
О чём код?
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } body { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #333; min-height: 100vh; padding: 20px; } .container { max-width: 1000px; margin: 0 auto; background: rgba(255, 255, 255, 0.95); border-radius: 15px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); overflow: hidden; } .header { background: linear-gradient(135deg, #2c3e50, #34495e); color: white; padding: 30px; text-align: center; } .header h1 { font-size: 2.2rem; margin-bottom: 10px; } .subtitle { font-size: 1.1rem; opacity: 0.9; } .main-content { padding: 30px; } /* Кнопка управления */ .controls { text-align: center; margin-bottom: 30px; } .colorize-btn { padding: 15px 30px; background: linear-gradient(135deg, #e74c3c, #c0392b); color: white; border: none; border-radius: 10px; font-size: 1.2rem; font-weight: 600; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3); } .colorize-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4); } .colorize-btn:active { transform: translateY(0); } /* Игровое поле */ .game-field { display: grid; grid-template-columns: repeat(10, 15px); grid-template-rows: repeat(10, 15px); gap: 1px; background-color: #bdc3c7; padding: 10px; border-radius: 8px; margin: 0 auto 30px auto; width: fit-content; border: 3px solid #34495e; } .cell { width: 15px; height: 15px; background-color: white; border: 1px solid #95a5a6; cursor: pointer; transition: all 0.2s ease; border-radius: 2px; } .cell:hover { transform: scale(1.1); z-index: 1; position: relative; } /* Статистика цветов */ .stats-section { margin-bottom: 30px; } .stats-section h2 { color: #2c3e50; margin-bottom: 20px; text-align: center; font-size: 1.5rem; } .colors-table { width: 100%; border-collapse: collapse; background: white; border-radius: 10px; overflow: hidden; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); } .colors-table th, .colors-table td { padding: 15px 20px; text-align: left; border-bottom: 1px solid #ecf0f1; } .colors-table th { background: linear-gradient(135deg, #3498db, #2980b9); color: white; font-weight: 600; font-size: 1.1rem; } .colors-table tr:nth-child(even) { background-color: #f8f9fa; } .colors-table tr:hover { background-color: #e3f2fd; } .color-sample { display: inline-block; width: 20px; height: 20px; border-radius: 4px; margin-right: 10px; vertical-align: middle; border: 1px solid #bdc3c7; } .count-badge { background: #34495e; color: white; padding: 5px 10px; border-radius: 20px; font-weight: 600; font-size: 0.9rem; } /* Легенда */ .legend { background: #f8f9fa; padding: 20px; border-radius: 10px; border: 2px solid #e9ecef; } .legend h3 { color: #2c3e50; margin-bottom: 15px; text-align: center; } .legend-items { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; } .legend-item { display: flex; align-items: center; gap: 10px; } .legend-color { width: 20px; height: 20px; border-radius: 4px; border: 1px solid #bdc3c7; } /* Анимации */ @keyframes colorChange { 0% { transform: scale(1); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } } .cell.color-changed { animation: colorChange 0.3s ease; } /* Адаптивность */ @media (max-width: 768px) { .container { margin: 10px; border-radius: 10px; } .header { padding: 20px; } .header h1 { font-size: 1.8rem; } .main-content { padding: 20px; } .game-field { transform: scale(0.9); transform-origin: center; } .legend-items { flex-direction: column; align-items: center; gap: 15px; } .colors-table { font-size: 0.9rem; } .colors-table th, .colors-table td { padding: 10px 15px; } } @media (max-width: 480px) { .game-field { transform: scale(0.8); } .colorize-btn { width: 100%; padding: 12px 20px; font-size: 1.1rem; } }