Answer the question
In order to leave comments, you need to log in
Is it possible to draw a block with beveled edges through the canvas and place html there?
You need to draw similar bevels, these blocks have parallax, all the ways that I tried are not suitable for oblique corners like here. Hope only for canvas. Is it possible to draw a block with beveled edges through the canvas and place html there?
photo 1
photo 2
Answer the question
In order to leave comments, you need to log in
There are basically two ways to do this today:
- clip-path
- transform
clip-path is the normal way, not a trick. But with cross-browser compatibility, everything is bad with him.
transform is more of a trick. Outer block skewY(5deg), nested skewY(-5deg).
Here is an example codepen.io/AMar4enko/pen/LbMmWe
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question