/
ikurakin
/
Position_on_HTML_and_CSS
Обзор
Документация
Войти
/
ikurakin
/
Position_on_HTML_and_CSS
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
style.css
314 строк
6 KB
Куракин Илья
Исходные файлы проекта
27 янв 2026, 21:21
Верифицирован
27 янв 2026, 21:21
b0888d0
Код
Авторство
О чём код?
/* Базовые стили */ * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; line-height: 1.6; color: #333; background-color: #f9f9f9; padding-bottom: 50px; } .container { max-width: 1200px; margin: 0 auto; padding: 20px; } .header { background: linear-gradient(135deg, #2c3e50, #4a6491); color: white; padding: 30px 20px; text-align: center; margin-bottom: 30px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); } .header h1 { font-size: 2.5rem; margin-bottom: 10px; } .header p { font-size: 1.1rem; opacity: 0.9; } .footer { background-color: #2c3e50; color: white; text-align: center; padding: 20px; margin-top: 50px; } /* Общие стили для задач */ .task { background-color: white; border-radius: 10px; padding: 25px; margin-bottom: 40px; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05); border-left: 5px solid #3498db; } .task h2 { color: #2c3e50; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 2px solid #f0f0f0; } .task p { margin-bottom: 20px; color: #555; } .task-content { display: flex; flex-direction: column; gap: 20px; } .task-hint { background-color: #f8f9fa; border-left: 4px solid #3498db; padding: 15px; border-radius: 0 5px 5px 0; margin-top: 10px; } .task-hint p { margin: 0; font-style: italic; color: #666; } /* Задача 1 */ .parent-box { width: 400px; height: 300px; border: 3px dashed #ccc; margin: 0 auto; position: static; /* Нужно изменить */ } .box { border-radius: 5px; display: flex; align-items: center; justify-content: center; color: white; font-weight: bold; } .relative-box { width: 100%; height: 100%; background-color: #3498db; } .absolute-box { width: 80px; height: 80px; } .red { background-color: #e74c3c; position: absolute; /* Нужно настроить */ top: auto; right: auto; bottom: auto; left: auto; } .green { background-color: #2ecc71; position: absolute; /* Нужно настроить */ top: auto; right: auto; bottom: auto; left: auto; } .blue { background-color: #3498db; } /* Задача 2 */ .z-index-container { width: 500px; height: 300px; margin: 0 auto; position: relative; } .z-box { width: 300px; height: 200px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: bold; color: white; position: absolute; } .z-box-1 { background-color: rgba(231, 76, 60, 0.9); top: 0; left: 0; z-index: 1; /* Нужно изменить */ } .z-box-2 { background-color: rgba(52, 152, 219, 0.9); top: 50px; left: 100px; z-index: 2; /* Нужно изменить */ } .z-box-3 { background-color: rgba(46, 204, 113, 0.9); top: 100px; left: 200px; z-index: 3; /* Нужно изменить */ } /* Задача 3 */ .main-nav { background-color: #2c3e50; padding: 15px; border-radius: 8px; display: flex; justify-content: center; gap: 20px; position: static; /* Нужно изменить */ width: 100%; top: 0; left: 0; } .nav-item { color: white; text-decoration: none; padding: 10px 20px; border-radius: 5px; transition: background-color 0.3s; } .nav-item:hover { background-color: #3498db; } .content { margin-top: 30px; padding: 20px; background-color: #f8f9fa; border-radius: 8px; } .content-placeholder { height: 300px; background: linear-gradient(to right, #e0e0e0, #f5f5f5); margin: 20px 0; border-radius: 5px; display: flex; align-items: center; justify-content: center; color: #666; font-style: italic; } /* Задача 4 */ .table-container { height: 400px; overflow-y: auto; border: 1px solid #ddd; border-radius: 8px; } .data-table { width: 100%; border-collapse: collapse; } .data-table th { background-color: #2c3e50; color: white; padding: 15px; text-align: left; position: static; /* Нужно изменить */ top: 0; } .data-table td { padding: 12px 15px; border-bottom: 1px solid #ddd; } .data-table tr:nth-child(even) { background-color: #f8f9fa; } .data-table tr:hover { background-color: #f1f1f1; } /* Задача 5 */ .stack-container { width: 600px; height: 400px; margin: 0 auto; border: 2px dashed #ccc; border-radius: 10px; position: relative; } .layer { width: 400px; height: 300px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; font-weight: bold; color: white; position: absolute; /* Нужно настроить */ box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); } .layer-1 { background-color: #e74c3c; z-index: 1; /* Нужно изменить */ top: auto; left: auto; } .layer-2 { background-color: #f39c12; z-index: 2; /* Нужно изменить */ top: auto; left: auto; } .layer-3 { background-color: #3498db; z-index: 3; /* Нужно изменить */ top: auto; left: auto; } .layer-4 { background-color: #2ecc71; z-index: 4; /* Нужно изменить */ top: auto; left: auto; }