Home | Top | Free Ajax Editor | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |
Sets or retrieves which part of a positioned object is visible.
Syntax
{ clip : sClip } |
object . style.clip [ = sClip ] |
Possible Values
sClip | String that specifies or receives one of the following values.
|
The property is read/write. The property has a default value of auto . The Cascading Style Sheets (CSS) attribute is not inherited.
Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see About Dynamic Properties .
Remarks
This property defines the shape and size of the positioned object that is visible. The position must be set to absolute . Any part of the object that is outside the clipping region is transparent. Any coordinate can be replaced by the value auto , which exposes the respective side (that is, the side is not clipped).
The order of the values clip : rect(0 0 50 50) renders the object invisible because it sets the top and right positions of the clipping region to 0. To achieve a 50-by-50 view port, use clip : rect(0 50 50 0) .
The clip attribute and the clip property are available on the Macintosh platform, as of Microsoft® Internet Explorer 5.
Examples
The following example shows how to use an inline style to clip the image.
<HTML>
The following example shows how to use inline scripting to clip the image.
<IMG ID="sphere" SRC="sphere.jpg" STYLE="position:absolute;top:0cm;left:0cm;">Standards Information
This property is defined in Cascading Style Sheets (CSS), Level 2 (CSS2) .
Applies To
|
A , ADDRESS , APPLET , B , BDO , BIG , BLOCKQUOTE , BUTTON , CENTER , CITE , CODE , CUSTOM , DD , defaults , DFN , DIR , DIV , DL , DT , EM , EMBED , FIELDSET , FORM , hn , HR , I , IFRAME , IMG , INPUT type=button , INPUT type=checkbox , INPUT type=file , INPUT type=image , INPUT type=password , INPUT type=radio , INPUT type=reset , INPUT type=submit , INPUT type=text , ISINDEX , KBD , LABEL , LEGEND , LI , LISTING , MARQUEE , MENU , OBJECT , OL , P , PRE , RUBY , runtimeStyle , S , SAMP , SELECT , SMALL , SPAN , STRIKE , STRONG , style , SUB , SUP , TABLE , TD , TEXTAREA , TH , TR , TT , U , UL , VAR , XMP |
Home | Top | Free Ajax Editor | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |