A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/svg/elements/rect below:

rect · WebPlatform Docs

rect Summary

The rect element is a SVG basic shape to create a rectangle starting with a given with and height beginning at a x- and y-point.

Overview Table
DOM Interface
SVGRectElement
Examples

In the following code example, the rect element is used to draw a purple rectangle.



<svg width="200" height="200" version="1.1" xmlns="http://www.w3.org/2000/svg">
  <rect x="10" y="5" width="100" height="80" fill="purple" />
</svg>

[View live example](http://code.webplatform.org/gist/44786e14924371effbe4)

In the following code example, the rect element is used to create a orange rectangle with rounded corners.



<svg width="200" height="200" version="1.1" xmlns="http://www.w3.org/2000/svg">
  <rect x="10" y="5" width="100" height="80" fill="orange" rx="10" ry="10" />
</svg>

[View live example](http://code.webplatform.org/gist/9697f0fe090f4ad2e6e9)

Attributes Global attributes Specific attributes DOM Interface

This element implements the SVGRectElement interface.

Members

The SVGRectElement object has these events:

The SVGRectElement object has these methods:

The SVGRectElement object has these properties:

Related specifications
The ‘rect’ element
W3C Recommendation
Attributions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4