I\'m trying to display only the top half of an image and the bottom half of the same image in 2 separate divs.
I\'ve tried with the CSS property clip
, but i
Sorry that I don't have enough reputation to write a comment.
There's absolutely a solution without JS.
All you need to do is
clipPath
, which allows you define whatever path you want. Apply the clipPath
in your css code.
#your-element {
clip-path: url(#clipPathId);
}
If you want more information, please refer this answer https://stackoverflow.com/a/28312070/5692151