Clip
要素内容をトリミングします。
このプロパティを実行するには、要素にPOSITIONでABSOLUTEを指定しなければなりません。
●関連プロパティ
POSITION | WIDTH | HEIGHT | OVERFLOW
{ clip : rect ( top, right, bottom, left ) | auto }
トリミングを指定
要素内容をトリミングします。値は、要素内容の原点からの距離を指定します。
サンプルは400px×400pxの画像を300px×300pxにトリミングした場合です。上から0px・右へ300px・下へ300px・左から0pxの位置で指定しています。数値を変えることで、任意の位置でトリミングできます。
{ clip : rect ( top, right, bottom, left ) }
div.space { position: absolute;
clip: rect(0px,300px,300px,0px);
top: 30px; left:
10px; height: 400px; width: 400px;
margin: 0pt 0pt;
border: 1px inset
rgb(204,204,204); }
<div class="space">
<img border="0" src="sample_map.gif" width="400" height="400">
</div>
|
|
|
|---|