A
A
Alexander Degtyarev2016-06-25 13:53:56
css
Alexander Degtyarev, 2016-06-25 13:53:56

Is it possible to crop part of an image in an image tag?

15a73b908da341a497791355eb98e39f.jpg
A half-inserted car icon is placed in multi-colored blocks (car with a yellow background is one image), this was done through a background image (background). Tell me, is it possible to achieve this by inserting an image through img? To also somehow cut off half of the image? Without using JS

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey, 2016-06-25
@ErichAltheim

Sure, negative margin, overflow: hidden
Example - codepen.io/anon/pen/WxRdRe

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question