Showing posts with label clip. Show all posts
Showing posts with label clip. Show all posts

Monday, 7 May 2012

CSS: clip your image or a container

   


Images are a important part of a web site. We know how to correctly place images, how to resize them, but how many of you know about clipping?
An image can be absolutely placed and clipped just to fit its container... with just a line of CSS.

An example?
Well, let's see the following image:

And now we try to clip it.



Can you see what's the effect?
How does it work?