Revision 91578 of stroke-width

  • Revision slug: SVG/Attribute/stroke-width
  • Revision title: stroke-width
  • Revision id: 91578
  • Created:
  • Creator: Jeremie
  • Is current revision? No
  • Comment page created, 100 words added

Revision Content

« SVG Attribute reference home

the stroke-width attribute specifies the width of the outline on the current object. Its default value is 1. If a <percentage> is used, the value represents a percentage of the current viewport. If a value of 0 is used the outline will never be drawn.

As a presentation attribute, it also can be used as a property directly inside a CSS stylesheet

Usage context

Categories Presentation attribute
Value <length> | <percentage> | inherit
Animatable Yes
Normative document SVG 1.1 (2nd Edition)

Example

Elements

The following elements can use the stroke-width attribute

Revision Source

<p>« <a href="/en/SVG/Attribute" title="en/SVG/Attribute">SVG Attribute reference home</a></p>
<p>the <code>stroke-width</code> attribute specifies the width of the outline on the current object. Its default value is <strong>1</strong>. If a &lt;percentage&gt; is used, the value represents a percentage of the current viewport. If a value of <strong>0</strong> is used the outline will never be drawn.</p>
<p>As a presentation attribute, it also can be used as a property directly inside a CSS stylesheet</p>
<h2 id="Usage_context">Usage context</h2>
<table class="standard-table"> <tbody> <tr> <th scope="row">Categories</th> <td>Presentation attribute</td> </tr> <tr> <th scope="row">Value</th> <td><a href="/en/SVG/Content_type#Length" title="en/SVG/Content_type#Length">&lt;length&gt;</a> | <a href="/en/SVG/Content_type#Percentage" title="en/SVG/Content_type#Percentage">&lt;percentage&gt;</a> | inherit</td> </tr> <tr> <th scope="row">Animatable</th> <td>Yes</td> </tr> <tr> <th scope="row">Normative document</th> <td><a class="external" href="http://www.w3.org/TR/SVG/painting.html#StrokeWidthProperty" title="http://www.w3.org/TR/SVG/painting.html#StrokeWidthProperty">SVG 1.1 (2nd Edition)</a></td> </tr> </tbody>
</table>
<h2 id="Example">Example</h2>
<h2 id="Elements">Elements</h2>
<p>The following elements can use the <code>stroke-width</code> attribute</p>
<ul> <li><a href="/en/SVG/Element#Shape" title="en/SVG/Element#Shape">Shape elements</a> »</li> <li><a href="/en/SVG/Element#TextContent" title="en/SVG/Element#TextContent">Text content elements</a> »</li>
</ul>
Revert to this revision