0

введите сюда описание изображения

Как сделать такой Div, И как после этого писать в нижней части красного дива? Спасибо

1 ответ 1

1

Думаю Вам понадобится position и z-index для решения этой задачи.

.wrap {
    width: 300px;
    height: 300px;
    background: gray;
}
.wrap > div {
    width: 150px;
    height: 150px;
    position: absolute;
    border-radius: 25px;
}
.first {
    background: green;
    top: 50px;
    left: 50px;
    z-index: 2;
}
.second {
    background: red;
    top: 90px;
    left: 90px;
    z-index: 1;
}
.text {
    bottom: 20px;
    left: 19px;
    position: absolute;
}
<div class="wrap">
  <div class="first"></div>
  <div class="second">
    <div class="text">Текст какой-то</div>
  </div>
</div>

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.