/
DmitryRudakov
/
Student-self-development
Обзор
Документация
Войти
/
DmitryRudakov
/
Student-self-development
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
main
css/style.css
1 031 строка
19 KB
Дмитрий Рудаков
Лаба8 добавил псевдоэлементы и псевдоклассы
31 мар 2026, 15:08
31 мар 2026, 15:08
188e0c9
Код
Авторство
О чём код?
*, *::before, *::after { box-sizing: border-box; } body { font-family: 'Roboto', sans-serif; } p { font-size: 16px; font-weight: 400; line-height: 1.5; text-align: left; } .paragraph-small { line-height: 1.5; } .paragraph-big { line-height: 2.5; } h1 { font-size: 48px; font-weight: 700; text-align: center; color: #2c3e50; } h2 { font-size: 32px; font-weight: 700; color: #34495e; } a { color: #3498db; text-decoration: none; } header { background-color: #ecf0f1; padding: 20px; border-bottom: 3px solid #bdc3c7; } footer { background-color: #34495e; color: white; padding: 20px; border-top-left-radius: 10px; border-top-right-radius: 10px; margin-top: 40px; } footer a { color: #ecf0f1; } input, select, button { border: 2px solid #bdc3c7; border-radius: 5px; padding: 8px 12px; font-size: 16px; } button { background-color: #3498db; color: white; border: none; cursor: pointer; } button:hover { background-color: #2980b9; } main { max-width: 1200px; min-width: 320px; margin: 0 auto; } img { max-width: 100%; height: auto; display: block; } header { min-height: 80px; } section { position: relative; min-height: auto; margin-bottom: 60px; padding: 20px; z-index: 1; } .news-item { position: relative; } .news-section { margin: 40px 0; padding: 20px; background-color: #f9f9f9; border-radius: 8px; } .badge { position: absolute; top: -10px; right: 10px; background-color: #ff6b6b; color: white; padding: 5px 10px; border-radius: 20px; font-size: 14px; font-weight: bold; z-index: 10; } .go-top { position: fixed; bottom: 30px; right: 30px; background-color: #3498db; color: white; width: 50px; height: 50px; border-radius: 50%; text-align: center; line-height: 50px; font-size: 24px; text-decoration: none; box-shadow: 0 2px 5px rgba(0,0,0,0.3); z-index: 100; } .go-top:hover { background-color: #2980b9; } section { position: relative; z-index: 1; } section::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(52, 152, 219, 0.1); opacity: 0; transition: opacity 0.3s; pointer-events: none; } section:hover::after { opacity: 1; } .flex-demo { margin: 50px 0; padding: 30px; background-color: #f5f9ff; border-radius: 15px; border: 2px solid #d0e0ff; } .gallery { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; align-items: center; min-height: 200px; background-color: #e9ecef; padding: 20px; border-radius: 10px; margin-bottom: 30px; } .gallery-item { width: 200px; height: 150px; background-color: steelblue; color: white; display: flex; justify-content: center; align-items: center; font-size: 2rem; font-weight: bold; border-radius: 10px; box-shadow: 0 5px 15px rgba(0,0,0,0.2); transition: transform 0.3s ease; } .gallery-item:nth-child(1) { background-color: #e74c3c; } .gallery-item:nth-child(2) { background-color: rgb(46, 204, 113); } .gallery-item:nth-child(3) { background-color: hsl(204, 70%, 53%); } .gallery-item:nth-child(4) { background-color: rgba(155, 89, 182, 0.8); } .gallery-item:nth-child(5) { background-color: #f39c12; } .gallery-item:nth-child(6) { background-color: #1abc9c; } .gallery-item:hover { transform: scale(1.05); } .cards-container { display: flex; flex-wrap: wrap; gap: 25px; justify-content: space-around; margin-bottom: 30px; } .card { flex: 1 1 250px; min-width: 250px; background: white; border-radius: 12px; padding: 25px 15px; text-align: center; box-shadow: 0 10px 25px hsla(210, 50%, 50%, 0.2); border: 2px solid #ddd; transition: all 0.3s; } .card:hover { transform: translateY(-5px); border-color: #3498db; } .card-icon { font-size: 3rem; margin-bottom: 15px; } .card h4 { color: #2c3e50; margin: 10px 0; font-size: 1.5rem; } .card p { color: #7f8c8d; font-size: 0.95rem; line-height: 1.5; } .flex-nav { display: flex; justify-content: flex-end; align-items: center; gap: 20px; background-color: #34495e; padding: 15px 25px; border-radius: 50px; margin-bottom: 30px; flex-wrap: wrap; } .nav-link { color: #ecf0f1 !important; text-decoration: none; padding: 8px 16px; border-radius: 30px; transition: all 0.3s; font-size: 1.1rem; background-color: rgba(255,255,255,0.1); } .nav-link:hover { background-color: #e74c3c; transform: scale(1.05); } .profile { display: flex; align-items: center; gap: 30px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); padding: 30px; border-radius: 20px; color: white; flex-wrap: wrap; } .profile-avatar { flex: 0 0 auto; order: 1; } .profile-avatar img { width: 100px; height: 100px; border-radius: 50%; border: 4px solid white; object-fit: cover; } .profile-info { flex: 2 1 300px; order: 2; } .profile-info h4 { font-size: 1.8rem; margin: 0 0 5px 0; color: white; } .profile-info p { margin: 5px 0; color: rgba(255,255,255,0.9); } .profile-bio { font-style: italic; margin-top: 10px; } .profile-stats { flex: 1 1 200px; display: flex; flex-direction: column; gap: 10px; order: 3; align-self: flex-end; background: rgba(255,255,255,0.2); padding: 15px; border-radius: 10px; } .profile-stats div { font-size: 1.1rem; text-align: center; } .units-demo { margin: 50px 0; padding: 30px; background-color: #f0f7f0; border-radius: 15px; border: 2px solid #a8e6a8; } .units-container { display: flex; flex-wrap: wrap; gap: 20px; margin: 20px 0; } .unit-box { width: 200px; height: 150px; background-color: #2ecc71; color: white; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; border-radius: 8px; } .unit-box.percent { width: 50%; background-color: #e67e22; } .unit-box.vw { width: 30vw; background-color: #9b59b6; } .unit-box.vh { height: 20vh; background-color: #e74c3c; } .unit-box.em { font-size: 2em; background-color: #1abc9c; } .unit-box.rem { font-size: 2rem; background-color: #f1c40f; color: #333; } .units-note { margin-top: 20px; padding: 15px; background: white; border-radius: 8px; font-size: 1rem; line-height: 1.6; } .news-section { margin: 40px 0; padding: 20px; background-color: #f9f9f9; border-radius: 8px; max-height: 400px; overflow-y: auto; border: 2px solid #ddd; box-shadow: inset 0 0 10px rgba(0,0,0,0.05); } .news-section::-webkit-scrollbar { width: 8px; } .news-section::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; } .news-section::-webkit-scrollbar-thumb { background: #3498db; border-radius: 4px; } .news-section::-webkit-scrollbar-thumb:hover { background: #2980b9; } .grid-demo-section { margin: 60px 0; padding: 30px; background-color: #f0f7ff; border-radius: 15px; border: 2px solid #b8d9ff; } .grid-demo-section h3 { color: #2c3e50; margin: 30px 0 15px; padding-bottom: 5px; border-bottom: 2px solid #3498db; } .simple-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; background-color: #e1f0fa; padding: 20px; border-radius: 10px; } .grid-cell { background-color: #3498db; color: white; padding: 30px 20px; text-align: center; font-size: 1.5rem; font-weight: bold; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); } .layout-grid { display: grid; grid-template-columns: 1fr 3fr; grid-template-rows: auto 1fr auto; gap: 15px; min-height: 400px; background-color: #e1f0fa; padding: 20px; border-radius: 10px; } .layout-header { grid-column: 1 / -1; background-color: #e74c3c; color: white; padding: 20px; text-align: center; border-radius: 8px; font-weight: bold; font-size: 1.2rem; } .layout-sidebar { background-color: #f39c12; color: white; padding: 20px; border-radius: 8px; } .layout-content { background-color: #2ecc71; color: white; padding: 20px; border-radius: 8px; } .layout-footer { grid-column: 1 / -1; background-color: #9b59b6; color: white; padding: 20px; text-align: center; border-radius: 8px; } .mixed-grid { display: grid; grid-template-columns: 1fr 2fr 1fr auto 200px 1fr; gap: 10px; background-color: #e1f0fa; padding: 20px; border-radius: 10px; } .mixed-item { background-color: #1abc9c; color: white; padding: 20px 10px; text-align: center; border-radius: 5px; font-size: 0.9rem; box-shadow: 0 2px 4px rgba(0,0,0,0.1); } .areas-grid { display: grid; grid-template-columns: 1fr 2fr 1fr; grid-template-rows: auto auto 1fr auto; gap: 15px; min-height: 500px; background-color: #e1f0fa; padding: 20px; border-radius: 10px; grid-template-areas: "header header header" "nav nav nav" "sidebar content extra" "footer footer footer"; overflow: hidden; } .area-header { grid-area: header; background: linear-gradient(135deg, #e74c3c, #c0392b); color: white; padding: 20px; border-radius: 8px; text-align: center; font-weight: bold; font-size: 1.2rem; box-shadow: 0 4px 6px rgba(0,0,0,0.1); } .area-nav { grid-area: nav; background: linear-gradient(135deg, #f39c12, #e67e22); color: white; padding: 15px; border-radius: 8px; text-align: center; font-weight: bold; } .area-sidebar { grid-area: sidebar; background: linear-gradient(135deg, #3498db, #2980b9); color: white; padding: 20px; border-radius: 8px; font-weight: bold; } .area-content { grid-area: content; background: linear-gradient(135deg, #2ecc71, #27ae60); color: white; padding: 30px; border-radius: 8px; font-size: 1.1rem; font-weight: bold; } .area-extra { grid-area: extra; background: linear-gradient(135deg, #9b59b6, #8e44ad); color: white; padding: 20px; border-radius: 8px; font-weight: bold; } .area-footer { grid-area: footer; background: linear-gradient(135deg, #34495e, #2c3e50); color: white; padding: 20px; border-radius: 8px; text-align: center; font-weight: bold; } .areas-description { margin-top: 20px; padding: 15px; background: #fff3cd; border-left: 5px solid #ffc107; border-radius: 5px; font-size: 1rem; } .areas-description code { background: #f8f9fa; padding: 2px 6px; border-radius: 4px; color: #d63384; } .simple-grid-merged { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: minmax(100px, auto); gap: 15px; background-color: #e1f0fa; padding: 20px; border-radius: 10px; margin-top: 20px; } .merged-area { grid-column: 2 / 4; grid-row: 2 / 4; background: linear-gradient(135deg, #9b59b6, #8e44ad) !important; display: flex; align-items: center; justify-content: center; font-size: 2rem; } /* Стили для страницы регистрации */ .form-page { max-width: 800px; margin: 40px auto; padding: 0 20px; } .registration-form { background-color: #f9f9f9; border-radius: 15px; padding: 30px; box-shadow: 0 5px 20px rgba(0,0,0,0.1); } fieldset { border: 2px solid #3498db; border-radius: 10px; margin-bottom: 25px; padding: 20px; } legend { font-size: 1.3rem; font-weight: bold; color: #2c3e50; padding: 0 15px; background-color: #f9f9f9; border-radius: 20px; } .form-group { margin-bottom: 20px; } .form-group label { display: block; margin-bottom: 5px; font-weight: 500; color: #34495e; } .form-group input[type="text"], .form-group input[type="password"], .form-group input[type="email"], .form-group input[type="tel"], .form-group input[type="date"], .form-group select { width: 100%; padding: 12px; border: 2px solid #bdc3c7; border-radius: 8px; font-size: 1rem; transition: border-color 0.3s; } .form-group input:focus, .form-group select:focus { border-color: #3498db; outline: none; box-shadow: 0 0 5px rgba(52,152,219,0.3); } .form-group input:required, .form-group select:required { border-left: 4px solid #e74c3c; } .form-group input::placeholder { color: #95a5a6; font-style: italic; } .radio-group { display: flex; flex-wrap: wrap; gap: 20px; padding: 10px 0; } .radio-label { display: flex; align-items: center; gap: 5px; cursor: pointer; } .radio-label input[type="radio"] { width: auto; margin-right: 5px; } .form-actions { display: flex; gap: 20px; justify-content: center; margin-top: 30px; } .btn-submit, .btn-reset { display: inline-flex; align-items: center; gap: 10px; padding: 12px 30px; font-size: 1.1rem; font-weight: bold; border: none; border-radius: 50px; cursor: pointer; transition: all 0.3s; } .btn-submit { background-color: #2ecc71; color: white; } .btn-submit:hover { background-color: #27ae60; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(46,204,113,0.3); } .btn-reset { background-color: #e74c3c; color: white; } .btn-reset:hover { background-color: #c0392b; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(231,76,60,0.3); } .btn-icon { font-size: 1.3rem; } html, body { height: 100%; margin: 0; } body { display: flex; flex-direction: column; min-height: 100vh; } main { flex: 1 0 auto; } .footer { flex-shrink: 0; background-color: #34495e; color: white; padding: 20px; text-align: center; margin-top: 40px; } .footer a { color: #ecf0f1; text-decoration: none; } .footer a:hover { text-decoration: underline; } ::selection { background-color: #f39c12; color: #2c3e50; } ::-moz-selection { background-color: #f39c12; color: #2c3e50; } a:link { color: #3498db; } a:visited { color: #9b59b6; } a:hover { color: #e74c3c; text-decoration: underline; } a:active { color: #2ecc71; } a:focus { outline: 3px solid #f39c12; outline-offset: 2px; border-radius: 4px; } .btn-submit:hover, .btn-reset:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.2); } .btn-submit:active, .btn-reset:active { transform: translateY(0); } .btn-submit:focus, .btn-reset:focus { outline: 3px solid #f39c12; outline-offset: 2px; } .form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: #3498db; box-shadow: 0 0 0 3px rgba(52,152,219,0.2); outline: none; background-color: #f0f9ff; } .form-group input::placeholder, .form-group textarea::placeholder { color: #95a5a6; font-style: italic; font-size: 0.9rem; opacity: 0.8; } .form-group input:focus::placeholder { opacity: 0.4; } .radio-label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; padding: 5px 12px; border-radius: 20px; transition: all 0.3s; } .radio-label:hover { background-color: #e9ecef; } .radio-label:has(input:checked) { background-color: #3498db; color: white; } .radio-label input[type="radio"]:checked { accent-color: #2ecc71; } .units-note ul { list-style: none; padding: 0; } .units-note li { padding: 10px 15px; margin: 5px 0; border-radius: 5px; transition: transform 0.3s; } .units-note li:hover { transform: translateX(10px); } .units-note li:nth-child(odd) { background-color: #e8f4f8; border-left: 4px solid #3498db; } .units-note li:nth-child(even) { background-color: #f0f0f0; border-left: 4px solid #9b59b6; } .paragraph-small::first-letter, .paragraph-big::first-letter { font-size: 2.5rem; font-weight: bold; color: #e74c3c; float: left; margin-right: 8px; line-height: 0.8; } .paragraph-small::first-line, .paragraph-big::first-line { font-weight: bold; color: #2c3e50; } ul li:nth-child(odd)::marker { color: #e74c3c; content: "★ "; } ul li:nth-child(even)::marker { color: #3498db; content: "● "; } .news-item h3::before { content: "📌 "; font-size: 1.1rem; } .news-item a::after { content: " →"; transition: transform 0.3s; display: inline-block; } .news-item a:hover::after { transform: translateX(5px); } .news-item h3 { position: relative; display: inline-block; } .news-item h3::after { content: ""; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px; background: linear-gradient(90deg, #3498db, #2ecc71); transition: width 0.3s ease; } .news-item:hover h3::after { width: 100%; } :root { --primary-color: #3498db; --success-color: #2ecc71; --danger-color: #e74c3c; --warning-color: #f39c12; --border-radius: 8px; --transition-speed: 0.3s; } .news-item:first-child { border-top: 2px solid #3498db; padding-top: 15px; } .news-item:last-child { border-bottom: 2px solid #2ecc71; padding-bottom: 15px; } .checked-demo { margin: 40px 0; padding: 30px; background-color: #f8f9fa; border-radius: var(--border-radius); border: 1px solid #ddd; clear: both; } .checked-demo label { display: block; margin: 12px 0; cursor: pointer; padding: 5px 10px; border-radius: 5px; transition: background-color 0.3s; } .checked-demo label:hover { background-color: #e9ecef; } .checked-demo input[type="checkbox"]:checked + span { text-decoration: line-through; color: #7f8c8d; font-style: italic; } .checked-demo input[type="checkbox"]:checked { accent-color: #2ecc71; }