Files
PIBD_21_Basalov_A_D_Interne…/style.css
2025-04-07 09:04:37 +03:00

241 lines
5.5 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* Общие стили для всех устройств */
html,
body {
height: 100%;
margin: 0;
font-family: Arial, sans-serif;
}
.wrapper {
min-height: 100%;
display: flex;
flex-direction: column;
}
/* Шапка */
.header {
display: flex;
flex-direction: column;
align-items: center;
padding: 10px;
background-color: #f8f9fa;
border-bottom: 1px solid #ddd;
}
.header-top {
display: flex;
align-items: center;
margin-bottom: 10px;
}
.logo {
width: 80px;
margin-right: 15px;
}
.header-text {
text-align: center;
}
.header-text h1 {
margin: 0;
font-size: 1.5rem;
color: #333;
}
.header-text p {
margin: 5px 0 0;
font-size: 0.9rem;
color: #777;
}
/* Навигация */
.navbar {
width: 50%;
display: flex;
justify-content: space-around;
background-color: #333;
padding: 10px 0;
border-radius: 5px;
}
.navbar a {
color: #fff;
text-decoration: none;
font-size: 1rem;
padding: 5px 10px;
transition: background-color 0.3s ease;
}
.navbar a:hover {
background-color: #555;
border-radius: 5px;
}
/* Выпадающее меню */
.dropdown {
position: relative;
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #444;
min-width: 160px;
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
z-index: 1;
border-radius: 5px;
margin-top: 5px;
}
.dropdown-content a {
color: #fff;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;
}
.dropdown-content a:hover {
background-color: #555;
}
.dropdown:hover .dropdown-content {
display: block;
}
/* Основной контент */
.content {
width: 40%;
flex: 1 1 auto;
margin: 20px auto;
padding: 20px;
background-color: #ffffff;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
border-radius: 10px;
}
/* Стили для подвала */
.footer {
position: relative; /* Делаем подвал относительным контейнером */
text-align: center;
padding: 10px;
background-color: #333;
color: #fff;
margin-top: 20px;
border-radius: 5px;
}
/* Стили для картинки в правом нижнем углу подвала */
.corner-image {
position: absolute; /* Абсолютное позиционирование внутри footer */
bottom: 10px; /* Отступ снизу внутри footer */
right: 10px; /* Отступ справа внутри footer */
z-index: 1000; /* Чтобы картинка была поверх других элементов */
transition: transform 0.3s ease; /* Плавное увеличение при наведении */
}
.corner-image img {
width: 60px; /* Размер картинки */
height: 50px;
border-radius: 50%; /* Круглая картинка (опционально) */
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Тень */
}
.corner-image:hover {
transform: scale(1.1); /* Увеличение при наведении */
}
/* Стили для контейнера с фотографиями факультетов */
.faculties-grid {
display: flex;
gap: 20px;
justify-content: center;
flex-wrap: wrap;
}
/* Стили для ссылки с фотографией */
.faculty-link {
text-decoration: none;
color: #333;
text-align: center;
border: 2px solid #ddd;
border-radius: 10px;
overflow: hidden;
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.faculty-link:hover {
transform: scale(1.05);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
/* Стили для фотографии */
.faculty-image {
width: 400px;
height: 600px;
object-fit: cover;
display: block;
}
/* Стили для текста под фотографией */
.faculty-link p {
margin: 10px 0;
font-size: 1.2rem;
}
/* Медиазапросы для планшетов (768px - 1024px) */
@media (max-width: 1024px) {
.navbar {
width: 70%; /* Увеличиваем ширину навигации */
}
.content {
width: 60%; /* Увеличиваем ширину контента */
}
.faculty-image {
width: 300px; /* Уменьшаем размер фотографий */
height: 450px;
}
}
/* Медиазапросы для телефонов (до 768px) */
@media (max-width: 768px) {
.header-text h1 {
font-size: 1.2rem; /* Уменьшаем размер заголовка */
}
.header-text p {
font-size: 0.8rem; /* Уменьшаем размер текста */
}
.navbar {
width: 90%; /* Навигация занимает почти всю ширину */
flex-direction: column; /* Меню в столбец */
align-items: center;
}
.navbar a {
padding: 10px; /* Увеличиваем отступы для удобства */
}
.content {
width: 90%; /* Контент занимает почти всю ширину */
}
.faculty-image {
width: 100%; /* Фотографии занимают всю ширину */
height: auto; /* Высота автоматически подстраивается */
}
.faculty-link p {
font-size: 1rem; /* Уменьшаем размер текста */
}
.corner-image img {
width: 50px; /* Уменьшаем размер иконки */
height: 40px;
}
}