N
N
Nikolai Marchenko2015-10-15 12:58:58
css
Nikolai Marchenko, 2015-10-15 12:58:58

How to make a rhomboid with a picture inside?

eb1f4fb618a54214967b7160a39bda22.PNG
I make a block with a picture inside, I add skewY(-20deg) distortion to the block, and skewY(20deg) compensation to the picture inside, but then I get empty corners at the bottom and top.
Moreover, this block must have a border and box-shadow.
I can't figure out how to implement it, please help.
The clip-path method doesn't work because IE 10+.
UPD: How can teeth be removed after such a transformation?
0ae05b3d7d534e82bdd362a2bdda9497.PNG

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexey Ukolov, 2015-10-15
@neonick

The height of the image should be greater than the original height of the rectangle - after all, when distorted, it increases. Should be something like this .

D
Dmitry Kravchenko, 2015-10-15
@mydearfriend

overflow:hidden;
on the container
in the picture

A
Alex K, 2015-10-15
@alexk111

For example: codepen.io/anon/pen/RWLyWX

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question