Answer the question
In order to leave comments, you need to log in
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
Answer the question
In order to leave comments, you need to log in
.box2 {
transform: translate(-20%, -20%); /* или сюда вместо процентов ширину первого квадрата забей */
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question