исправление размера добавление фона

This commit is contained in:
mimi committed 2025-02-18 12:50:02 +03:00
1 parent 4978c36070
commit ad810c6217
36 files changed
+1553 -135

No files matched your search

+55 -12
View File
@@ -1,29 +1,58 @@
@import "../../assets/styles/theme.scss";
.row.lab-list {
position: relative;
&::before {
content: "";
position: absolute;
top: 10%;
left: 0;
width: 100%; // Увеличиваем ширину на 10%, чтобы занять отступ
height: 436px;
background-image: url('../../assets/images/backround/bg_labs_block.svg');
background-repeat: no-repeat;
background-position: left center;
background-size: contain; // Или cover, если нужно заполнить область
z-index: -1;
transform: translateX(-11.6%); // Смещаем влево, компенсируя padding
@media (max-width: 768px) {
display: none; // Скрываем картинку на мобильных
}
}
display: grid;
grid-template-columns: repeat(3, calc((100% - $row-gap * 2) / 3));
grid-template-columns: repeat(3, minmax(0, 1fr)); /* Используем 1fr для равных колонок */
justify-content: space-between;
gap: $row-gap;
max-width: 100%; // Гарантия, что не выйдет за границы
width: 100%;
box-sizing: border-box; // Учитываем padding и border внутри ширины
.card {
display: block;
position: relative;
height: 300px;
overflow: hidden;
position: relative;
border-radius: 8px;
border-width: 1px;
border-style: solid;
border-color: transparent;
color: $text-secondary;
background: $bg-card-lab;
border: 1px solid transparent;
.image {
position: absolute;
object-fit: cover;
width: 100%;
height: 100%;
opacity: 0.9;
transition: opacity .2s ease-out;
opacity: 1;
transition: opacity 0.3s ease-out;
}
.card-content {
@@ -32,11 +61,11 @@
inset: auto 20px 10px 20px;
transition: inset .3s;
background: none !important;
z-index: 2; /* Контент всегда сверху */
h2 {
margin: 0;
font-size: 24px;
font-size: 20px;
font-weight: 600;
line-height: 28px;
}
@@ -57,6 +86,7 @@
font-size: 20px;
font-weight: 500;
line-height: 24px;
}
}
}
@@ -73,7 +103,20 @@
&:hover .image {
transition: opacity .3s ease-in;
opacity: 0.5;
filter: brightness(0.5); /* Затемняем изображение */
}
}
}
}
// Медиа-запрос для мобильных устройств
@media (max-width: 768px) {
.row.lab-list {
grid-template-columns: repeat(1, minmax(0, 1fr));
}
.card {
width: 100%; /* Карточка занимает всю ширину своей колонки */
height: 215px !important; /* Устанавливаем минимальную высоту */
}
}