View Full Version : CSS clip property
ktsirig
10-28-2006, 07:54 AM
Hello,
I wanted to know some things about the "clip" property of CSS. In particular, I want to ask how you do the following: if, in an image, let's say, you want to see only the center part of it,how can you "crop" the rest image?
Thank you!
Disturbed
10-28-2006, 08:02 AM
Well, you can crop it in paint if you want, but I'm also sure that you can only show a part of it ( Will edit if I can remember )
HighCaliber
10-28-2006, 07:07 PM
Here is some info on this property ...
http://www.w3schools.com/css/pr_pos_clip.asp
Doesn't look as if you can grab center of image
RysChwith
10-30-2006, 07:26 AM
Sure you can. The four values you enter represent the amount on each side to clip. Like everything else in CSS, it starts at the top and goes in clockwise order.
So if you did:img { clip: rect( 1px 2px 3px 4px ) }You'd shave one pixel off the top, two pixels off the right side, three off the bottom, and four off the left side.
Rys
vBulletin® v3.6.7, Copyright ©2000-2010, Jelsoft Enterprises Ltd.