/
RoditelevVV
/
web-static-labs
Обзор
Документация
Войти
/
RoditelevVV
/
web-static-labs
Код
Запросы
0
Задачи
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
html/lab5/task5/styles.css
338 строк
6 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: 500px; margin: 0 auto; background: rgba(255, 255, 255, 0.95); border-radius: 20px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); overflow: hidden; } .header { background: linear-gradient(135deg, #2c3e50, #34495e); color: white; padding: 25px; text-align: center; } .header h1 { font-size: 2.2rem; margin-bottom: 8px; } .subtitle { font-size: 1rem; opacity: 0.9; } .main-content { padding: 25px; } .calculator-display { background: #f8f9fa; border: 2px solid #e9ecef; border-radius: 15px; padding: 20px; margin-bottom: 20px; } .display-row { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; flex-wrap: wrap; } .operand-input { flex: 1; min-width: 120px; padding: 12px 15px; border: 2px solid #ddd; border-radius: 8px; font-size: 1.1rem; text-align: right; background: white; font-family: 'Courier New', monospace; } .operand-input:focus { outline: none; border-color: #667eea; } .operator-select { padding: 12px 15px; border: 2px solid #ddd; border-radius: 8px; font-size: 1.1rem; background: white; cursor: pointer; min-width: 80px; } .operator-select:focus { outline: none; border-color: #667eea; } .result-section { display: flex; align-items: center; gap: 15px; padding: 10px 0; border-top: 2px solid #e9ecef; } .equals { font-size: 1.5rem; font-weight: bold; color: #667eea; min-width: 20px; } .result { font-size: 1.8rem; font-weight: bold; color: #2c3e50; font-family: 'Courier New', monospace; flex: 1; text-align: right; word-break: break-all; } /* Кнопки калькулятора */ .calculator-buttons { margin-bottom: 20px; } .buttons-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; } .btn { padding: 15px 10px; border: none; border-radius: 10px; font-size: 1.1rem; font-weight: 600; cursor: pointer; transition: all 0.3s ease; min-height: 60px; } .btn:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); } .btn:active { transform: translateY(0); } .number-btn { background: linear-gradient(135deg, #3498db, #2980b9); color: white; } .number-btn:hover { background: linear-gradient(135deg, #2980b9, #2471a3); } .operation-btn { background: linear-gradient(135deg, #e74c3c, #c0392b); color: white; } .operation-btn:hover { background: linear-gradient(135deg, #c0392b, #a93226); } .equals-btn { background: linear-gradient(135deg, #00b09b, #96c93d); color: white; grid-column: span 2; } .equals-btn:hover { background: linear-gradient(135deg, #00a187, #85b836); } .clear-btn { background: linear-gradient(135deg, #f39c12, #e67e22); color: white; } .clear-btn:hover { background: linear-gradient(135deg, #e67e22, #d35400); } /* Дополнительные опции */ .calculator-options { margin-bottom: 20px; padding: 15px; background: #f8f9fa; border-radius: 10px; } .checkbox-label { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; color: #2c3e50; } .checkbox-label input { display: none; } .checkmark { width: 20px; height: 20px; border: 2px solid #667eea; border-radius: 4px; position: relative; transition: all 0.3s ease; } .checkbox-label input:checked + .checkmark { background: #667eea; } .checkbox-label input:checked + .checkmark::after { content: '✓'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: white; font-weight: bold; font-size: 12px; } /* История вычислений */ .history-section { background: #f8f9fa; padding: 20px; border-radius: 10px; border: 2px solid #e9ecef; } .history-section h3 { color: #2c3e50; margin-bottom: 15px; font-size: 1.2rem; } .history-list { max-height: 200px; overflow-y: auto; margin-bottom: 15px; background: white; border-radius: 8px; padding: 10px; border: 1px solid #e9ecef; } .history-item { padding: 8px 12px; margin-bottom: 5px; background: white; border-radius: 6px; border-left: 4px solid #667eea; font-family: 'Courier New', monospace; font-size: 0.9rem; } .history-item:last-child { margin-bottom: 0; } .clear-history-btn { background: linear-gradient(135deg, #95a5a6, #7f8c8d); color: white; width: 100%; padding: 12px; font-size: 1rem; } .clear-history-btn:hover { background: linear-gradient(135deg, #7f8c8d, #707b7c); } /* Утилиты */ .hidden { display: none !important; } /* Адаптивность */ @media (max-width: 768px) { .container { margin: 10px; border-radius: 15px; } .header { padding: 20px; } .header h1 { font-size: 1.8rem; } .main-content { padding: 20px; } .display-row { flex-direction: column; align-items: stretch; } .operand-input, .operator-select { min-width: auto; width: 100%; } .buttons-grid { grid-template-columns: repeat(3, 1fr); } .equals-btn { grid-column: span 3; } } @media (max-width: 480px) { .btn { padding: 12px 8px; font-size: 1rem; min-height: 50px; } .result { font-size: 1.5rem; } .history-list { max-height: 150px; } }