CSS
- 34 ответа
- 0 вопросов
26
Вклад в тег
.card
.card__date
.card__image
.card__info
.card__icon
<div class="card">
<div class="card__date"><span class="card__day">25</span> april</div>
<picture class="card__picture">
<img class="card__image" src="https://unsplash.it/1000/300" alt="">
</picture>
<div class="card__info">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Consequatur sequi enim quia, voluptatibus laborum atque magnam sapiente sint expedita quas! Similique aspernatur quod optio quasi ducimus tempora commodi, maxime vel!</p>
<button class="card__btn">+</button>
</div>
</div>
*, *::before, *::after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.card {
display: flex;
flex-wrap: wrap;
}
.card__date {
order: 1;
background-color: yellow;
padding: 10px;
display: flex;
flex-direction: column;
align-items: center;
}
.card__day {
font-size: 30px;
}
.card__info {
order: -1;
position: relative;
padding: 20px;
}
.card__btn {
position: absolute;
bottom: 10px;
right: 10px;
background: none;
border: 0;
font-size: 30px;
}
.card__image {
object-fit: cover;
display: block;
}
.card__picture {
overflow: hidden;
display: flex;
justify-content: center;
}
.card__picture,
.card__info {
flex-grow: 1;
flex-basis: 50%;
flex-shrink: 0;
background-color: orange;
}