/
magarich
/
web
Обзор
Документация
Войти
/
magarich
/
web
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
html/lab5/task5/style.css
220 строк
3 KB
Юра Магарьян
Final submission: Lab2 and Lab3 by Magaryan Yury PIZ2402
17 апр 2026, 23:12
17 апр 2026, 23:12
0827836
Код
Авторство
О чём код?
/* style.css — task5 */ * { box-sizing: border-box; margin: 0; padding: 0; } body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: #f0f2f5; min-height: 100vh; padding: 40px 20px; display: flex; justify-content: center; align-items: center; } .calculator { background: #fff; padding: 36px 32px 32px; border-radius: 20px; box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08); max-width: 380px; width: 100%; position: relative; overflow: hidden; } .calculator::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: linear-gradient(90deg, #6c63ff, #48bfe3); } .display { width: 100%; padding: 16px 18px; font-size: 1.4rem; border: 1.5px solid #d1d5db; border-radius: 12px; margin-bottom: 18px; text-align: right; background: #fafafa; color: #1a1a2e; font-weight: 600; outline: none; transition: border-color 0.2s; } .display:focus { border-color: #6c63ff; background: #fff; } .buttons-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; } button { padding: 16px; font-size: 1rem; border: none; border-radius: 10px; cursor: pointer; font-weight: 600; color: #374151; background: #f3f4f6; transition: background 0.15s ease, transform 0.15s ease; } button:hover { background: #e5e7eb; transform: translateY(-1px); } button:active { transform: translateY(0); } .operator { background: #ede9fe; color: #6c63ff; } .operator:hover { background: #6c63ff; color: white; } .equals { background: #dcfce7; color: #16a34a; } .equals:hover { background: #22c55e; color: white; } .clear { background: #fef2f2; color: #ef4444; } .clear:hover { background: #ef4444; color: white; } .function { background: #fff7ed; color: #f59e0b; } .function:hover { background: #f59e0b; color: white; } .controls { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; } .checkbox-container { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #f8f9fc; border-radius: 10px; border: 1.5px solid #e5e7eb; white-space: nowrap; } .checkbox-container input[type="checkbox"] { width: 16px; height: 16px; accent-color: #6c63ff; cursor: pointer; } .checkbox-container label { font-size: 0.85rem; font-weight: 600; color: #374151; cursor: pointer; } .hidden { display: none; } .result { margin-top: 4px; padding: 14px 16px; border-radius: 10px; background: #fafafa; min-height: 22px; font-weight: 700; font-size: 1.1rem; color: #6b7280; border: 1.5px solid #e5e7eb; text-align: center; transition: all 0.2s ease; } .result:not(:empty) { background: #f0fdf4; border-color: #bbf7d0; color: #166534; } @keyframes buttonPress { 0% { transform: scale(1); } 50% { transform: scale(0.95); } 100% { transform: scale(1); } } button:active { animation: buttonPress 0.1s ease; } @media (max-width: 480px) { .calculator { padding: 28px 20px 24px; } .display { padding: 13px 14px; font-size: 1.2rem; } button { padding: 13px; font-size: 0.9rem; } .buttons-grid { gap: 8px; } .controls { flex-direction: column; align-items: stretch; } .checkbox-container { justify-content: center; } }