mirror of
https://git.rdcenter.ru/RDCenter/skb-kit.git
synced 2026-12-05 05:49:45 +00:00
внесла изменения в блок новосте, убрала баг с Баг с Наши лаборатории, мигание карточки
This commit is contained in:
1 parent
d1fb20b3f0
commit
9ff2df78e8
25 files changed
+701
-126
No files matched your search
@@ -1,44 +1,53 @@
|
||||
$news-card-gap: 1em;
|
||||
|
||||
#news {
|
||||
#news-list {
|
||||
.row {
|
||||
display: grid;
|
||||
display: flex;
|
||||
flex-wrap: wrap; // Чтобы карточки корректно переносились
|
||||
gap: $news-card-gap;
|
||||
justify-content: space-between; // Равномерное распределение карточек
|
||||
|
||||
.card {
|
||||
width: 100%;
|
||||
aspect-ratio: 1/1;
|
||||
padding: 0;
|
||||
margin-bottom: 1em;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
border: none;
|
||||
margin-bottom: 1em; // Отступ снизу
|
||||
|
||||
@media (max-width: 768px) {
|
||||
width: 100%; // 1 карточка в ряд на мобильных
|
||||
height: 215px; // Меньшая высота для мобильных
|
||||
}
|
||||
|
||||
.pic {
|
||||
aspect-ratio: 1 / 1;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 0;
|
||||
padding-top: 100%;
|
||||
height: 100%;
|
||||
border-radius: 8px; // Округляем углы изображения
|
||||
overflow: hidden; // Обрезаем лишнее
|
||||
|
||||
.image {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
object-position: top; // Устанавливаем позицию обрезки сверху
|
||||
border-radius: 8px; // Округление углов изображения
|
||||
}
|
||||
|
||||
.label {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
min-height:15%;
|
||||
padding: 22px 16px;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
border-radius: 0 0 8px 8px;
|
||||
|
||||
font-size: 20px;
|
||||
font-weight: 500;
|
||||
font-weight: 600;
|
||||
line-height: 24px;
|
||||
color: white;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user