From 7a208cc6489bf86e66c758c7879c7096a17ade4c Mon Sep 17 00:00:00 2001 From: Matt Huntington Date: Tue, 23 Aug 2016 06:57:22 -0400 Subject: [PATCH] moving styling to top polyline --- SVG.md | 55 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 30 insertions(+), 25 deletions(-) diff --git a/SVG.md b/SVG.md index 3ddedf4..30f0e57 100644 --- a/SVG.md +++ b/SVG.md @@ -19,6 +19,33 @@ SVG tag is an inline element - -x goes left - -y goes up +## Styling + +Can be done with attributes: + +- `fill=red` or `fill=#ff0000` fill color +- `stroke=red` or `stroke=#ff0000` stroke color +- `stroke-width=4` width of stroke +- `fill-opacity=0.5` transparency of fill +- `stroke-opacity=0.5` transparency of stroke +- `transform = "translate(2,3)"` +- `transform = "scale(2.1)"` +- `transform = "rotate(45deg)"` + + +Can also be done with CSS: + +```css +circle { + fill:red; + stroke:blue; + stroke-width:3; + fill-opacity:0.5; + stroke-opacity:0.1; + transform:rotate(45deg) scale(0.4) translate(155px, 1px); +} +``` + ## Circle - attributes @@ -76,33 +103,11 @@ SVG tag is an inline element ``` ## Polyline -## Path - -## Styling - -Can be done with attributes: - -- `fill=red` or `fill=#ff0000` fill color -- `stroke=red` or `stroke=#ff0000` stroke color -- `stroke-width=4` width of stroke -- `fill-opacity=0.5` transparency of fill -- `stroke-opacity=0.5` transparency of stroke -- `transform = "translate(2,3)"` -- `transform = "scale(2.1)"` -- `transform = "rotate(45deg)"` - -Can also be done with CSS: +A series of connected lines. Can have a fill like a polygon, but won't automatically rejoin itself -```css -circle { - fill:red; - stroke:blue; - stroke-width:3; - fill-opacity:0.5; - stroke-opacity:0.1; - transform:rotate(45deg) scale(0.4) translate(155px, 1px); -} +```xml + ``` ## Path