/
enn
/
WebSite1_lab
Обзор
Документация
Войти
/
enn
/
WebSite1_lab
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
lab6git
CSS/style.css
202 строки
4 KB
Sebastiana
lab6git
09 мар 2026, 13:55
09 мар 2026, 13:55
0e1f73d
Код
Авторство
О чём код?
/* style.css - лаб. работа 6 с Grid */ /* Подключаем шрифт Roboto (кириллический) */ @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap'); * { box-sizing: border-box; margin: 0; padding: 0; } body { font-family: 'Roboto', sans-serif; font-size: 16px; font-weight: 300; line-height: 1.6; color: #2c3e50; background-color: #ecf0f1; margin: 0 auto; padding: 20px; min-width: 320px; max-width: 1200px; min-height: 100vh; /* Основной Grid для всего документа */ display: grid; grid-template-rows: auto 1fr auto auto auto; grid-template-columns: 1fr; gap: 20px; grid-template-areas: "header" "content" "links" "footer"; } h1 { font-weight: 500; text-align: center; color: #c0392b; background-color: #fff; border: 2px solid #e67e22; border-radius: 10px; padding: 15px; width: 80%; max-width: 800px; margin: 0 auto; /* Grid-область */ grid-area: header; justify-self: center; } /* Основной контент - Grid из двух колонок */ .content-row { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; grid-area: content; margin: 20px 0; } .text-column { display: grid; grid-template-rows: auto; gap: 15px; } p { font-size: 17px; font-weight: 400; line-height: 1.7; background-color: #fff; border-left: 4px solid #e67e22; border-radius: 0 8px 8px 0; padding: 15px; margin: 0; box-shadow: 0 2px 5px rgba(0,0,0,0.05); } .sidebar-column { display: grid; grid-template-rows: auto auto; gap: 20px; } /* Стили для figure и изображений */ figure { margin: 0; padding: 15px; background-color: #fff; border-radius: 15px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); } /* Grid внутри figure */ display: grid; grid-template-rows: auto auto; gap: 10px; justify-items: center; } figure img { width: 100%; height: 300px; object-fit: cover; object-position: center; border: 3px solid #e67e22; border-radius: 15px; } figure img:hover { transform: scale(1.02); object-fit: contain; background-color: #f5f5f5; } figcaption { text-align: center; font-style: italic; color: #e67e22; font-size: 14px; font-weight: 400; } /* Контейнер для ссылок с Grid */ .links-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; justify-content: center; align-items: center; grid-area: links; margin: 20px 0; } a { color: #2980b9; text-decoration: none; font-weight: 500; padding: 10px 15px; background-color: #fff; border-radius: 8px; border: 1px solid #bdc3c7; display: inline-block; text-align: center; transition: all 0.3s ease; /* Центрируем ссылки в Grid ячейках */ justify-self: stretch; align-self: center; } a:hover { color: #e67e22; text-decoration: underline; } ul { font-size: 17px; font-weight: 400; line-height: 1.8; border: 2px dashed #e67e22; border-radius: 8px; background-color: #fff; padding: 20px 35px; margin: 0; list-style: none; /* Grid для элементов списка */ display: grid; grid-template-columns: 1fr; gap: 10px; } footer { background-color: #34495e; color: #ecf0f1; text-align: center; border: 1px solid #e67e22; border-radius: 0.3rem; padding: 1rem; grid-area: footer; width: 100%; /* Grid внутри футера */ display: grid; grid-template-columns: 1fr; align-items: center; justify-items: center; } footer p { font-size: 0.9rem; font-weight: 300; line-height: 1.4; border: none; background: transparent; color: #bdc3c7; padding: 0; min-height: 20px; }