{"id":9309,"date":"2022-10-06T04:43:53","date_gmt":"2022-10-06T04:43:53","guid":{"rendered":"https:\/\/mdr.foobrdigital.com\/?p=9309"},"modified":"2022-10-06T04:43:53","modified_gmt":"2022-10-06T04:43:53","slug":"svg-stroking","status":"publish","type":"post","link":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/2022\/10\/06\/svg-stroking\/","title":{"rendered":"SVG Stroking"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"description-of-the-stroke-properties-1\">Description of the stroke properties<\/h2>\n\n\n\n<p>SVG offers different stroke properties that can be applied to any kind of text, lines and outlines of elements. They allow controlling various aspects of a stroke. Here are some stroke properties:<\/p>\n\n\n\n<ul><li><strong>stroke<\/strong>&nbsp;for specifying the color of a line, outline or text of an element,<\/li><li><strong>stroke-linecap<\/strong>&nbsp;for specifying how the endings of an SVG line are rendered,<\/li><li><strong>stroke-width<\/strong>&nbsp;for specifying the thickness of a line, outline, or text of an element,<\/li><li><strong>stroke-dasharray<\/strong>&nbsp;for specifying dashed lines.<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"example-of-the-stroke-property-3\">Example of the stroke property:<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n  &lt;head&gt;\n    &lt;title&gt;Title of the document&lt;\/title&gt;\n  &lt;\/head&gt;\n  &lt;body&gt;\n    &lt;svg width=\"250\" height=\"100\" &gt;\n      &lt;g fill=\"none\"&gt;\n        &lt;path stroke=\"purple\" d=\"M5 30 l215 0\" \/&gt;\n        &lt;path stroke=\"lightgreen\" d=\"M5 60 l215 0\" \/&gt;\n        &lt;path stroke=\"pink\" d=\"M5 90 l215 0\" \/&gt;\n      &lt;\/g&gt;\n      Sorry, your browser doesn't support inline SVG.\n    &lt;\/svg&gt;\n  &lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"example-of-the-stroke-linecap-property-5\">Example of the stroke-linecap property:<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n  &lt;head&gt;\n    &lt;title&gt;Title of the document&lt;\/title&gt;\n  &lt;\/head&gt;\n  &lt;body&gt;\n    &lt;svg width=\"250\" height=\"100\"&gt;\n      &lt;g fill=\"none\" stroke=\"lightblue\" stroke-width=\"10\"&gt;\n        &lt;path stroke-linecap=\"butt\" d=\"M5 30 l215 0\" \/&gt;\n        &lt;path stroke-linecap=\"round\" d=\"M5 60 l215 0\" \/&gt;\n        &lt;path stroke-linecap=\"square\" d=\"M5 90 l215 0\" \/&gt;\n      &lt;\/g&gt;\n    &lt;\/svg&gt;\n  &lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"example-of-the-stroke-width-property-7\">Example of the stroke-width property:<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n  &lt;head&gt;\n    &lt;title&gt;Title of the document&lt;\/title&gt;\n  &lt;\/head&gt;\n  &lt;body&gt;\n    &lt;svg width=\"250\" height=\"100\"&gt;\n      &lt;g fill=\"none\" stroke=\"lightgreen\"&gt;\n        &lt;path stroke-width=\"3\" d=\"M5 30 l215 0\" \/&gt;\n        &lt;path stroke-width=\"5\" d=\"M5 60 l215 0\" \/&gt;\n        &lt;path stroke-width=\"7\" d=\"M5 90 l215 0\" \/&gt;\n      &lt;\/g&gt;\n    &lt;\/svg&gt;\n  &lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"example-of-the-stroke-dasharray-property-9\">Example of the stroke-dasharray property:<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n  &lt;head&gt;\n    &lt;title&gt;Title of the document&lt;\/title&gt;\n  &lt;\/head&gt;\n  &lt;body&gt;\n    &lt;svg width=\"250\" height=\"100\"&gt;\n      &lt;g fill=\"none\" stroke=\"orange\" stroke-width=\"5\"&gt;\n        &lt;path stroke-dasharray=\"3,5\" d=\"M5 30 l215 0\" \/&gt;\n        &lt;path stroke-dasharray=\"12,12\" d=\"M5 60 l215 0\" \/&gt;\n        &lt;path stroke-dasharray=\"30,15,10,10,10,15\" d=\"M5 90 l215 0\" \/&gt;\n      &lt;\/g&gt;\n    &lt;\/svg&gt;\n  &lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Description of the stroke properties SVG offers different stroke properties that can be applied to any kind of text, lines and outlines of elements. They allow controlling various aspects of a stroke. Here are some stroke properties: stroke&nbsp;for specifying the color of a line, outline or text of an element, stroke-linecap&nbsp;for specifying how the endings [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[574],"tags":[],"_links":{"self":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/posts\/9309"}],"collection":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/comments?post=9309"}],"version-history":[{"count":0,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/posts\/9309\/revisions"}],"wp:attachment":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/media?parent=9309"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/categories?post=9309"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/tags?post=9309"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}