mozilla

Revision 69248 of <shape>

  • Revision slug: CSS/shape
  • Revision title: shape
  • Revision id: 69248
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment 26 words added, 6 words removed

Revision Content

Summary

The <shape> CSS data type denotes the specific form of a region. This region is used to define on which part of an element some properties like {{ Cssxref("clip") }} do apply.

Syntax

 <a_css_property> : rect(<top>, <right>, <bottom>, <left>) ;

Values

<top>, <bottom>
specify offsets from the top border edge of the box.
<right>, <left>
specify offsets from the left border edge of the box normally (ie, in left-to-right text). For a box in right-to-left text they will indicate offset from right border edge.

Examples

 img.clip04 { 
   clip: rect(10px, 20px, 20px, 10px);
 }

Notes

  • Internet Explorer below version 8 doesn't support comma-separated values, spaces are used instead. Internet Explorer 8 and above support comma-separated values.

Specifications

Browser compatibility

{{ CompatibilityTable() }}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 1.0 {{ CompatGeckoDesktop("1.0") }} 5.5 9.5 1.3
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }}

See also

  • Related CSS properties: {{ Cssxref("clip") }}
  • CSS Reference index
  • CSS Data Types : {{ CSSDataTypes() }}

Revision Source

<h2 name="Summary">Summary</h2>
<p>The <code>&lt;shape&gt;</code> <a href="/en/CSS" title="CSS">CSS</a> data type denotes the specific form of a region. This region is used to define on which part of an element some properties like {{ Cssxref("clip") }} do apply.</p><h2 name="Syntax">Syntax</h2>
<pre class="eval"> <em>&lt;a_css_property&gt;</em> : <span class="nowiki">rect(&lt;top&gt;, &lt;right&gt;, &lt;bottom&gt;, &lt;left&gt;)</span> ;
</pre>
<h2 name="Values">Values</h2>
<dl> <dt>&lt;top&gt;, &lt;bottom&gt;</dt> <dd>specify offsets from the top border edge of the box.</dd> <dt>&lt;right&gt;, &lt;left&gt;</dt> <dd>specify offsets from the left border edge of the box normally (ie, in left-to-right text). For a box in right-to-left text they will indicate offset from right border edge.</dd>
</dl>
<h2 name="Examples">Examples</h2>
<pre class="eval"> img.clip04 { 
   clip: rect(10px, 20px, 20px, 10px);
 }
</pre>
<h2 name="Notes">Notes</h2>
<ul> <li>Internet Explorer below version 8 doesn't support comma-separated values, spaces are used instead. Internet Explorer 8 and above support comma-separated values.</li>
</ul>
<h2 name="Specifications">Specifications</h2>
<ul> <li><a class="external" href="http://www.w3.org/TR/CSS21/visufx.html#value-def-shape">CSS 2.1</a></li>
</ul>
<h2 name="Browser_compatibility">Browser compatibility</h2>
<p>{{ CompatibilityTable() }}</p>
<div id="compat-desktop"> <table class="compat-table"> <tbody> <tr> <th>Feature</th> <th>Chrome</th> <th>Firefox (Gecko)</th> <th>Internet Explorer</th> <th>Opera</th> <th>Safari</th> </tr> <tr> <td>Basic support</td> <td>1.0</td> <td>{{ CompatGeckoDesktop("1.0") }}</td> <td>5.5</td> <td>9.5</td> <td>1.3</td> </tr> </tbody> </table>
</div>
<div id="compat-mobile"> <table class="compat-table"> <tbody> <tr> <th>Feature</th> <th>Android</th> <th>Firefox Mobile (Gecko)</th> <th>IE Mobile</th> <th>Opera Mobile</th> <th>Safari Mobile</th> </tr> <tr> <td>Basic support</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatUnknown() }}</td> </tr> </tbody> </table>
</div>
<h2 name="See_also">See also</h2>
<ul> <li>Related CSS properties: {{ Cssxref("clip") }}</li> <li><a href="/en/CSS_Reference" title="CSS Reference">CSS Reference</a> index</li> <li>CSS Data Types : {{ CSSDataTypes() }}</li>
</ul>
Revert to this revision