/
maxbln
/
AllMyProjects
Обзор
Документация
Войти
/
maxbln
/
AllMyProjects
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
css/style2.css
268 строк
5 KB
maxbln
Загрузить файлы в «»
10 ноя 2025, 20:01
10 ноя 2025, 20:01
b16344e
Код
Авторство
О чём код?
/* Reset default styles */ * { margin: 0; padding: 0; box-sizing: border-box; } header { background-color: #32746d; /* как у footer */ color: #2c3e50; /* базовый цвет текста — тёмный */ padding: 1rem 2rem; display: flex; align-items: center; justify-content: center; gap: 0.5rem; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); } header > h1 { color: white; /* только заголовок h1 белый */ font-size: 1.8rem; font-weight: 700; text-align: center; } body { font-family: 'Inter', sans-serif; line-height: 1.6; color: #2c3e50; background-color: #f1f7ed; margin: 0; overflow-x: hidden; } header img { height: 40px; cursor: pointer; transition: transform 0.3s ease; } header img:hover { transform: scale(1.1); } nav { background-color: #fff; border-bottom: none; padding: 1rem 2rem; box-shadow: none; position: sticky; top: 0; z-index: 1000; } ul {padding-left: 20px;} nav ul { padding-left: 0px; list-style: none; display: flex; justify-content: center; gap: 1.5rem; } nav ul li { position: relative; } nav > ul > li { color: #2c3e50; cursor: pointer; text-decoration: none; font-weight: 600; padding: 0.5rem 1.5rem; transition: background-color 0.3s ease, color 0.3s ease; border-radius: 8px; cursor: pointer; } nav > ul > li:hover { background-color: #74c69d; color: #fff; } nav ul li ul { display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); background-color: #fff; border: 1px solid #ddd; min-width: 200px; border-radius: 8px; overflow: hidden; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); z-index: 10; } nav ul li:hover > ul { display: block; } nav > ul > li > ul > li { display: block; padding: 0.75rem 1rem; color: #2c3e50; border-radius: 8px; cursor: pointer; } nav > ul > li > ul > li:hover { background-color: #f4f4f4; color: #74c69d; } /* Main content */ main { padding: 2rem; max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr; gap: 2rem; } main section { color: #edf6f9; background-color: #edf6f9; border-radius: 12px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); padding-top: 4rem; padding-top: 4rem; padding: 1rem; transition: transform 0.3s ease, box-shadow 0.3s ease; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; } main section header { text-align: center; margin-top: 2rem; background: none; box-shadow: none; padding: 0; grid-column: 1 / -1; } main section header h2 { color: #2c3e50; font-size: 2rem; font-weight: 600; position: relative; display: inline-block; padding-bottom: 0rem; } main section header h2::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 1px; background-color: #2c3e50; } article { background: #fff; padding: 1.5rem; border-radius: 8px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); } main article:hover { transform: translateY(-2px); box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15); } article h3 { margin-bottom: 0.5rem; font-size: 1.5rem; color: #34495e; position: relative; display: inline-block; } article h3::after { content: ''; position: absolute; width: 0; height: 2px; bottom: 0; left: 0; background-color: #588157; transition: width 0.3s ease; } article:hover h3::after { width: 100%; } article p { margin: 1rem; color: #666; line-height: 1.8; margin-top: 0.5rem; } aside { background-color: #edf6f9; padding: 1rem; border-radius: 12px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); margin-bottom: 2rem; max-width: 1140px; margin-left: auto; margin-right: auto; } footer { background: #32746d; color: #fff; text-align: center; padding: 1.5rem 1rem; margin-top: 2rem; font-size: 0.9rem; border-radius: 0; } footer p { margin: 1rem; font-weight: 500; } footer p a:hover { color: #ecf0f1; } section footer { background: #588157; color: #fff; padding: 0.8rem; text-align: center; cursor: pointer; font-weight: 600; transition: background-color 0.3s ease; margin-top: -1px; width: 100%; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); } section footer:hover { background-color: #699268; } a { color: #3498db; text-decoration: none; transition: color 0.3s ease; } a:hover { color: #2980b9; }