Deutsch | English | Español | Français |
Italiano | 日本語 | 한국어 | Português |
Pусский | 简体中文 | 繁體中文 |
Gets the left coordinate of the object clipping region.
Syntax
JavaScript |
|
---|
Property values
Type: Variant
-
The left side of object is fully exposed—that is, the left side is not clipped.
-
Floating-point number, followed by a supported length unit.
Examples
This example demonstrates how to read the clipLeft property from the currentStyle object of an image.
Code example: http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/clipLeft.htm
<script type="text/javascript">
function setClip(sOptionValue) {
oImage.style.clip="rect("+sOptionValue+",100,100,0)";
if (oImage.currentStyle.clipLeft == "60px") {
alert("The image has been clipped to 60px.");
}
...
}
</script>
...
<img id="oImage" alt="sphere" src="/workshop/graphics/sphere.png">
...
Pick an amount to clip the left:
// the option value is sent as an argument:
<select onchange="setClip(value)">
<option value="100">reset</option>
<option value="40">40px</option>
<option value="50">50px</option>
<option value="60">60px</option>
</select>
See also