P
P
pixal2020-05-09 19:45:17
css
pixal, 2020-05-09 19:45:17

How to place 2 div blocks in a diamond shape so that one edge overlaps the other?

Tell me please! How to place 2 div blocks in a rhombus, so that one edge overlaps the other. At the same time, when the window is resized, they adapt synchronously and do not lose the given shape.

Approximately as in the picture
5eb6df08b6688340561572.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
RAX7, 2020-05-09
@pixal

D
Dubolom Unicellular, 2020-05-09
@duboloms

.box2 {
  transform: translate(-20%, -20%); /* или сюда вместо процентов ширину первого квадрата забей */
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question