/
enn
/
WebSite1_lab
Обзор
Документация
Войти
/
enn
/
WebSite1_lab
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
lab8
CSS/style.css
490 строк
9 KB
Sebastiana
lab8
19 мар 2026, 15:27
19 мар 2026, 15:27
39f7d2a
Код
Авторство
О чём код?
/* style.css - лаб. работа 7 */ @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap'); * { box-sizing: border-box; margin: 0; padding: 0; } html, body { height: 100%; } body { font-family: 'Roboto', sans-serif; font-size: 1rem; font-weight: 300; line-height: 1.6; color: #2c3e50; background-color: hsl(192, 15%, 94%); margin: 0 auto; padding: 2rem; min-width: 320px; max-width: 1200px; min-height: 100vh; position: relative; display: flex; flex-direction: column; } ::selection { background-color: #e67e22; /* Оранжевый фон */ color: white; /* Белый текст */ } .nav-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 1rem; margin: 1rem 0 2rem; } h1 { font-weight: 500; text-align: center; color: darkred; background-color: rgba(255, 255, 255, 0.9); border: 0.2rem solid #e67e22; border-radius: 10px; width: 80%; max-width: 800px; min-height: 60px; margin: 0 auto 2rem; position: relative; } .content-row { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 2rem; margin: 2rem 0; } .text-column { flex: 1 1 45%; min-width: 300px; display: flex; flex-direction: column; gap: 1rem; } p { font-size: 1.1rem; font-weight: 400; line-height: 1.7; background-color: rgb(255, 255, 255); border-left: 0.4rem solid #e67e22; border-radius: 0 8px 8px 0; padding: 1rem; max-width: 100%; min-height: 80px; margin: 0; position: relative; box-shadow: 0 2px 5px rgba(0,0,0,0.1); } .sidebar-column { flex: 1 1 45%; min-width: 300px; display: flex; flex-direction: column; gap: 1.5rem; } .image-container { width: 100%; max-width: 500px; margin: 0 auto; position: relative; } img { border: 0.3rem solid #e67e22; border-radius: 15px; max-width: 100%; height: auto; display: block; margin: 0 auto; width: 100%; max-width: 500px; min-width: 200px; min-height: 150px; max-height: 400px; object-fit: cover; position: relative; } .image-container::after { content: ""; position: absolute; top: -10px; left: -10px; width: 100%; height: 100%; border: 2px dashed #e67e22; border-radius: 15px; pointer-events: none; } .links-container { display: flex; justify-content: center; flex-wrap: wrap; gap: 1.5rem; margin: 2rem 0; } a { color: #2980b9; text-decoration: none; font-weight: 500; display: inline-block; min-width: 120px; height: 2.5rem; line-height: 2.5rem; text-align: center; background-color: rgba(255, 255, 255, 0.8); border: 1px solid #e67e22; border-radius: 2rem; padding: 0 1rem; position: relative; } a:hover { color: hsl(16, 100%, 50%); background-color: hsla(30, 80%, 60%, 0.3); text-decoration: underline; } ul { font-size: 1.1rem; font-weight: 400; line-height: 1.8; border: 0.2rem dashed #e67e22; border-radius: 0.5rem; background-color: #fff; padding: 1.5rem 2rem; width: 100%; max-width: 600px; min-height: 150px; margin: 0 auto; position: relative; list-style: none; } li { color: hsl(0, 0%, 20%); min-height: 2rem; position: relative; padding-left: 1.5rem; margin-bottom: 0.5rem; } li::before { content: "•"; position: absolute; left: 0; color: orangered; font-size: 1.5rem; font-weight: bold; } li::first-letter { font-size: 2rem } footer { background-color: #34495e; color: #ecf0f1; text-align: center; border: 1px solid #e67e22; border-radius: 0.3rem; padding: 0.8rem; margin-top: 3rem; min-height: 60px; position: relative; bottom: 0; width: 100%; } footer p { font-size: 0.9rem; font-weight: 300; line-height: 1.4; border: none; background: transparent; color: #bdc3c7; padding: 0; min-height: 20px; } /* ========== Стили для лабораторной работы №6 (Формы) ========== */ /* Шапка для страницы формы */ header { background-color: #34495e; color: #ecf0f1; padding: 1rem; margin-bottom: 2rem; border-radius: 8px; text-align: center; border: 1px solid #e67e22; } header h1 { color: #f39c12; background: none; border: none; margin: 0.5rem auto 0; padding: 0; width: auto; } nav { margin-bottom: 0.5rem; } nav a { color: #ecf0f1; background-color: rgba(230, 126, 34, 0.3); border: 1px solid #e67e22; min-width: auto; height: auto; line-height: normal; padding: 0.5rem 1.5rem; border-radius: 2rem; } nav a:hover { background-color: #e67e22; color: white; text-decoration: none; } nav a:focus { background-color: #e67e22; } a:focus { background-color: #e8491f; } a:active { background-color: hsl(228.52deg 84.72% 46.6%); } /* Основной контент - растягивается для прижатого footer */ main { flex: 1 0 auto; max-width: 900px; margin: 0 auto 2rem; padding: 0 1rem; width: 100%; box-sizing: border-box; } /* Стили для формы */ .form-registration { background-color: #fff; border-radius: 15px; padding: 2rem; box-shadow: 0 5px 15px rgba(0,0,0,0.1); border: 1px solid #e67e22; } fieldset { border: 2px solid #e67e22; border-radius: 10px; padding: 1.5rem; margin-bottom: 1.5rem; background-color: #fef9f5; } legend { font-size: 1.2rem; font-weight: 500; color: darkred; background-color: white; padding: 0.3rem 1rem; border: 1px solid #e67e22; border-radius: 2rem; } /* Группа для каждого поля */ .field-group { margin-bottom: 1.2rem; } .field-group label { display: block; font-weight: 500; margin-bottom: 0.3rem; color: #2c3e50; } /* Обязательные поля */ .field-group label.required::after { content: " *"; color: #e74c3c; font-weight: bold; font-size: 1.2rem; } /* Поля ввода */ .field-group input[type="text"], .field-group input[type="email"], .field-group input[type="tel"], .field-group input[type="password"], .field-group input[type="date"], .field-group select { width: 100%; padding: 0.8rem; border: 1px solid #ccc; border-radius: 5px; font-size: 1rem; font-family: 'Roboto', sans-serif; background-color: #fff; } .field-group input:focus, .field-group select:focus { outline: none; border-color: #e67e22; box-shadow: 0 0 5px rgba(230, 126, 34, 0.5); } /* Placeholder стили */ .field-group input::placeholder, .field-group select::placeholder { color: #999; font-style: italic; font-weight: 300; } /* Группа для радио кнопок (пол) */ .radio-group { display: flex; flex-wrap: wrap; gap: 1.5rem; padding: 0.5rem 0; } .radio-group label { display: inline-flex; align-items: center; font-weight: 400; margin-bottom: 0; cursor: pointer; color: #2c3e50; } .radio-group input[type="radio"] { margin-right: 0.5rem; width: 1.2rem; height: 1.2rem; cursor: pointer; accent-color: #e67e22; } /* Группа для чекбоксов (интервалы) */ .checkbox-group { display: flex; flex-wrap: wrap; gap: 1.2rem; padding: 0.5rem 0; } .checkbox-group label { display: inline-flex; align-items: center; font-weight: 400; margin-bottom: 0; cursor: pointer; color: #2c3e50; } .checkbox-group input[type="checkbox"] { margin-right: 0.5rem; width: 1.2rem; height: 1.2rem; cursor: pointer; accent-color: #e67e22; } /* Стили для select (выпадающий список) */ .field-group select { appearance: none; background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e67e22' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 0.8rem center; background-size: 1.2rem; padding-right: 2.5rem; } /* Кнопки */ .button-group { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; } button { padding: 0.8rem 2rem; font-size: 1.1rem; font-weight: 500; border: none; border-radius: 2rem; cursor: pointer; display: inline-flex; align-items: center; gap: 0.5rem; font-family: 'Roboto', sans-serif; border: 1px solid transparent; } .btn-submit { background-color: #27ae60; color: white; } .btn-submit:hover { background-color: #2ecc71; box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3); } .btn-reset { background-color: #e67e22; color: white; } .btn-reset:hover { background-color: #f39c12; box-shadow: 0 5px 15px rgba(230, 126, 34, 0.3); } /* Стили для ошибок валидации (необязательно, но полезно) */ .field-group input:invalid:not(:placeholder-shown) { border-color: #e74c3c; } .field-group input:invalid:not(:placeholder-shown):focus { box-shadow: 0 0 5px rgba(231, 76, 60, 0.5); } ::placeholder { color: #7f8c8d; /* Темно-серый цвет */ font-style: italic; /* Курсив */ font-size: 1rem; /* Размер шрифта */ font-weight: 300; /* Тонкий шрифт */ opacity: 0.8; /* Немного прозрачности */ }