D
D
Dymok2018-02-28 18:33:09
css
Dymok, 2018-02-28 18:33:09

How to crop an image to a diamond shape?

There is such an element in the layout:
5a96cb502e6c0860756805.png
I started doing like this , but I can’t figure out how to enlarge the image and position it in the center of the diamond ..

Answer the question

In order to leave comments, you need to log in

2 answer(s)
0
0xD34F, 2018-02-28
@UnluckySerivelha

Hold . You can choose the size you need - just change the scale.

V
Viktor Yanyshev, 2018-02-28
@villiwalla

div
transform: rotate();
background: transition;
div > div or div >img
background-image: url();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question