SlideShare a Scribd company logo
1 of 17
CSS
SVG
SVG
<svg version="1.1" baseProfile="full" width="300" height="200"
xmlns="http://www.w3.org/2000/svg">
<rect width="100%" height="100%" fill="red" />
<circle cx="150" cy="100" r="80" fill="green" />
<text x="150" y="125" font-size="60" text-anchor="middle" fill="white">SVG</text>
</svg>
Rectangle
<rect x="10" y="10" width="30" height="30"/>
<rect x="60" y="10" rx="10" ry="10" width="30" height="30"/>
x The x position of the top left corner of the rectangle.
y The y position of the top left corner of the rectangle.
width The width of the rectangle
height The height of the rectangle
rx The x radius of the corners of the rectangle
ry The y radius of the corners of the rectangle
Circle
<circle cx="25" cy="75" r="20"/>
r The radius of the circle.
cx The x position of the center of the circle.
cy The y position of the center of the circle.
Ellipse
<ellipse cx="75" cy="75" rx="20" ry="5"/>
rx The x radius of the ellipse.
ry The y radius of the ellipse.
cx The x position of the center of the ellipse.
cy The y position of the center of the ellipse.
Line
<line x1="10" x2="50" y1="110" y2="150"/>
x1 The x position of point 1.
y1 The y position of point 1.
x2 The x position of point 2.
y2 The y position of point 2.
Polyline
<polyline points="60 110,60 120, 90 150, 120 120, 120 110" />
points A list of points, each number separated by a space,
comma, EOL, or a line feed character. Each point must contain
two numbers, an x coordinate and a y coordinate. So the list
(0,0), (1,1) and (2,2) could be written: "0 0, 1 1, 2 2"
Polygon
<polygon points="60 110,60 120, 90 150, 120 120, 120 110" />
points A list of points, each number separated by a space,
comma, EOL, or a line feed character. Each point must
contain two numbers, an x coordinate and a y coordinate.
So the list (0,0), (1,1) and (2,2) could be written: "0 0, 1 1, 2
2". The drawing then closes the path, so a final straight line
would be drawn from (2,2) to (0,0).
Path
<path d="M150 0 L75 200 L225 200 Z" />
d A list of commands.
M = moveto
L = lineto
H = horizontal lineto
V = vertical lineto
C = curveto
S = smooth curveto
Q = quadratic Bézier curve
T = smooth quadratic Bézier curveto
A = elliptical Arc
Z = closepath
Note: All of the commands above can also be expressed with
lower letters. Capital letters means absolutely positioned,
lower cases means relatively positioned.
Path
<path d="M10 10 H 90 V 90 H 10 L 10 50 " fill="transparent" stroke="black"/>
L x y (or l dx dy) – line to x,y coordinate
H x (or h dx) V y (or v dy) – vertical or horizontal line
<path d="M10 10 H 90 V 90 H 10 L 10 50 Z" fill="transparent" stroke="black"/>
Z draws a straight line from your current position back to the
first point that started the path
<path d="M10 10 h 80 v 80 h -80 Z" fill="transparent" stroke="black"/>
Path
<path d="M10 10 C 20 20, 40 20, 50 10" stroke="black" fill="transparent"/>
<path d="M70 10 C 70 20, 120 20, 120 10" stroke="black" fill="transparent"/>
<path d="M130 10 C 120 20, 180 20, 170 10" stroke="black" fill="transparent"/>
<path d="M10 60 C 20 80, 40 80, 50 60" stroke="black" fill="transparent"/>
<path d="M70 60 C 70 80, 110 80, 110 60" stroke="black" fill="transparent"/>
<path d="M130 60 C 120 80, 180 80, 170 60" stroke="black" fill="transparent"/>
<path d="M10 110 C 20 140, 40 140, 50 110" stroke="black" fill="transparent"/>
<path d="M70 110 C 70 140, 110 140, 110 110" stroke="black" fill="transparent"/>
<path d="M130 110 C 120 140, 180 140, 170 110" stroke="black" fill="transparent"/>
C x1 y1, x2 y2, x y (or c dx1 dy1, dx2 dy2, dx dy)
The last set of coordinates here (x,y) are where you
want the line to end. The other two are control points.
(x1,y1) is the control point for the start of your curve,
and (x2,y2) for the end point of your curve. If you are
familiar with algebra or calculus, the control points
essentially describe the slope of your line starting at
each point.
Path
<path d="M10 80 C 40 10, 65 10, 95 80 S 150 150, 180 80" stroke="black"
fill="transparent"/>
S x2 y2, x y (or s dx2 dy2, dx dy)
S produces the same type of curve as earlier, but if it
follows another S command or a C command, the first
control point is assumed to be a reflection of the one
used previously. If the S command doesn't follow
another S or C command, then it is assumed that both
control points for the curve are the same.
Path
<path d="M10 80 Q 95 10 180 80" stroke="black" fill="transparent"/>
Q x1 y1, x y (or q dx1 dy1, dx dy)
quadratic Bezier, it takes two arguments, the control
point and the end point of the curve
<path d="M10 80 Q 52.5 10, 95 80 T 180 80" stroke="black" fill="transparent"/>
T x y (or t dx dy)
produces the same type of curve as earlier, if follows
another Q command or a T command, the control point
is assumed to be a reflection of the one used previously.
If the T command doesn't follow another T or Q
command, then it is assumed that control point and
start point for the curve are the same.
Path
<path d="M10 315 L 110 215
A 30 50 0 0 1 162.55 162.45 L 172.55 152.45
A 30 50 -45 0 1 215.1 109.9 L 315 10"
stroke="black" fill="green" stroke-width="2" fill-opacity="0.5"/>
A rx ry x-axis-rotation large-arc-flag sweep-flag x y
a rx ry x-axis-rotation large-arc-flag sweep-flag dx
Arcs are sections of circles or ellipses. For a given x-
radius and y-radius, there are two ellipses that can
connect any two points (as long as they're within the
radius of the circle). Along either of those circles there
are two possible paths that you can take to connect the
points, so in any situation there are four possible arcs
available. The final two arguments designate the x and y
coordinates to end the stroke at.
Colors and Lines
<rect x="10" y="10" width="100" height="100"
stroke="blue" fill="purple" fill-opacity="0.5" stroke-opacity="0.8"/>
Fill sets the color inside the object and stroke sets the color of the
line drawn around the object.
Fill-opacity and stroke-opacity attributes specify the opacity of
either the fill or stroke separately in SVG.
<line x1="40" x2="120" y1="20" y2="20" stroke-width="20" stroke-linecap="butt"/>
<line x1="40" x2="120" y1="60" y2="60" stroke-width="20" stroke-linecap="square"/>
<line x1="40" x2="120" y1="100" y2="100" stroke-width="20" stroke-linecap="round"/>
Stroke-width property defines the width of this stroke, the stroke is
distributed evenly on both sides of the path.
Stroke-linecap property controls the shape shown at the end of lines.
#MyRect:hover {
stroke: black;
fill: blue;
}
Colors and Lines
<polyline points="40 60 80 20 120 60" stroke="black" stroke-width="20"
fill="none" stroke-linejoin="miter"/>
<polyline points="40 140 80 100 120 140" stroke="black" stroke-width="20"
fill="none" stroke-linejoin="round"/>
<polyline points="40 220 80 180 120 220" stroke="black" stroke-width="20"
fill="none" stroke-linejoin="bevel"/>
Stroke-linejoin attribute controlled the joint where the two meet.
<path d="M 10 75 Q 50 10 100 75 T 190 75" stroke-dasharray="5,10,5" fill="none"/>
<path d="M 10 75 L 190 75" stroke="red" stroke-width="1" stroke-dasharray="5,5" />
stroke-dasharray attribute takes as an argument a series of comma
separated numbers. Each of the numbers specifies a distance for
first the filled area, and then for the unfilled area.
Gradients
<svg width="120" height="240" >
<defs>
<linearGradient id="Gradient1">
<stop class="stop1" offset="0%"/>
<stop class="stop2" offset="50%"/>
<stop class="stop3" offset="100%"/>
</linearGradient>
<linearGradient id="Gradient2" x1="0" x2="0" y1="0" y2="1">
<stop offset="0%" stop-color="red"/>
<stop offset="50%" stop-color="black" stop-opacity="0"/>
<stop offset="100%" stop-color="blue"/>
</linearGradient>
<style type="text/css"><![CDATA[
#rect1 { fill: url(#Gradient1); }
.stop1 { stop-color: red; }
.stop2 { stop-color: black; stop-opacity: 0; }
.stop3 { stop-color: blue; }
]]></style>
</defs>
<rect id="rect1" x="10" y="10" rx="15" ry="15" width="100" height="100"/>
<rect x="10" y="120" rx="15" ry="15" width="100" height="100" fill="url(#Gradient2)"/>
</svg>
Gradients
<svg width="120" height="240" >
<defs>
<radialGradient id="Gradient1">
<stop offset="0%" stop-color="red"/>
<stop offset="100%" stop-color="blue"/>
</radialGradient>
<radialGradient id="Gradient2" cx="0.25" cy="0.25" r="0.25">
<stop offset="0%" stop-color="red"/>
<stop offset="100%" stop-color="blue"/>
</radialGradient>
</defs>
<rect x="10" y="10" rx="15" ry="15" width="100" height="100" fill="url(#Gradient1)"/>
<rect x="10" y="120" rx="15" ry="15" width="100" height="100" fill="url(#Gradient2)"/>
</svg>
Text
<text x="10" y="10" text-anchor ="start" >Hello World!</text>
The x and y attributes determine, where in the viewport the text will appear.
The attribute text-anchor, which can have the values start, middle, end or inherit, allows to decide,
in which direction the text flows from this point.
<text>
<tspan font-weight="bold" fill="red">This is bold and red</tspan>
</text>
x Set a new absolute x coordinate for the containing text. This overwrites the default current text
position. The attribute may also contain a list of numbers, that are one by one applied to the single
characters of the tspan element.
dx Start drawing the text with a horizontal offset dx from the default current position. Here, too, you
may provide a list of values that are applied to consecutive characters, hence piling up the offset
over time.
Likewise there are y and dy for vertical displacement.
rotate Rotate all charactes by this degree. A list of numbers makes each character rotate to its
respective value, with remaining characters rotating according to the last value.
<path id="my_path" d="M 20,20 C 40,40 80,40 100,20" />
<text>
<textPath xlink:href="#my_path">This text follows a curve.</textPath>
</text>
Transformations
<rect x="0" y="0" width="10" height="10" transform="translate(30,40)" />
translate(x,y) – translate figure to the point x,y
rotate(deg) – rotate figugre
skewX(x) and skewY(y) – skew figugre
scale(dx,dy) – scale figugre
matrix(a, b, c, d, e, f) – complex transformations
Grouping
<g fill="red">
<rect x="0" y="0" width="10" height="10" />
<rect x="20" y="0" width="10" height="10" />
</g>

More Related Content

Similar to Css6 svg

HTML 5 گرافیک دو بعدی در
HTML 5 گرافیک دو بعدی در HTML 5 گرافیک دو بعدی در
HTML 5 گرافیک دو بعدی در Shiraz LUG
 
Лаб.р №1 "Фабрика Blockly"
Лаб.р №1 "Фабрика Blockly"Лаб.р №1 "Фабрика Blockly"
Лаб.р №1 "Фабрика Blockly"OlesiaJL
 
Фабрика "Blockly" (исправлено)
Фабрика "Blockly" (исправлено)Фабрика "Blockly" (исправлено)
Фабрика "Blockly" (исправлено)OlesiaJL
 
Advanced Data Visualization Examples with R-Part II
Advanced Data Visualization Examples with R-Part IIAdvanced Data Visualization Examples with R-Part II
Advanced Data Visualization Examples with R-Part IIDr. Volkan OBAN
 
Electrical engg material
Electrical engg material Electrical engg material
Electrical engg material Ramesh Meti
 
JSinSA - JS Visualisation APIs
JSinSA - JS Visualisation APIsJSinSA - JS Visualisation APIs
JSinSA - JS Visualisation APIsBrendon McLean
 
redis überall
redis überallredis überall
redis überallzucaritask
 
The Ring programming language version 1.8 book - Part 42 of 202
The Ring programming language version 1.8 book - Part 42 of 202The Ring programming language version 1.8 book - Part 42 of 202
The Ring programming language version 1.8 book - Part 42 of 202Mahmoud Samir Fayed
 
SVG, CSS3, and D3 for Beginners
SVG, CSS3, and D3 for BeginnersSVG, CSS3, and D3 for Beginners
SVG, CSS3, and D3 for BeginnersOswald Campesato
 
The Ring programming language version 1.9 book - Part 45 of 210
The Ring programming language version 1.9 book - Part 45 of 210The Ring programming language version 1.9 book - Part 45 of 210
The Ring programming language version 1.9 book - Part 45 of 210Mahmoud Samir Fayed
 

Similar to Css6 svg (20)

Svg Basics
Svg BasicsSvg Basics
Svg Basics
 
SVG overview
SVG overviewSVG overview
SVG overview
 
HTML 5 گرافیک دو بعدی در
HTML 5 گرافیک دو بعدی در HTML 5 گرافیک دو بعدی در
HTML 5 گرافیک دو بعدی در
 
Лаб.р №1 "Фабрика Blockly"
Лаб.р №1 "Фабрика Blockly"Лаб.р №1 "Фабрика Blockly"
Лаб.р №1 "Фабрика Blockly"
 
Фабрика "Blockly" (исправлено)
Фабрика "Blockly" (исправлено)Фабрика "Blockly" (исправлено)
Фабрика "Blockly" (исправлено)
 
COMPUTER GRAPHICS
COMPUTER GRAPHICSCOMPUTER GRAPHICS
COMPUTER GRAPHICS
 
Raphaël
RaphaëlRaphaël
Raphaël
 
Advanced Data Visualization Examples with R-Part II
Advanced Data Visualization Examples with R-Part IIAdvanced Data Visualization Examples with R-Part II
Advanced Data Visualization Examples with R-Part II
 
Electrical engg material
Electrical engg material Electrical engg material
Electrical engg material
 
JSinSA - JS Visualisation APIs
JSinSA - JS Visualisation APIsJSinSA - JS Visualisation APIs
JSinSA - JS Visualisation APIs
 
vertical-curves
vertical-curvesvertical-curves
vertical-curves
 
PART 5: RASTER DATA
PART 5: RASTER DATAPART 5: RASTER DATA
PART 5: RASTER DATA
 
Css5 canvas
Css5 canvasCss5 canvas
Css5 canvas
 
redis überall
redis überallredis überall
redis überall
 
program logbook 2
program logbook 2program logbook 2
program logbook 2
 
The Ring programming language version 1.8 book - Part 42 of 202
The Ring programming language version 1.8 book - Part 42 of 202The Ring programming language version 1.8 book - Part 42 of 202
The Ring programming language version 1.8 book - Part 42 of 202
 
SVG, CSS3, and D3 for Beginners
SVG, CSS3, and D3 for BeginnersSVG, CSS3, and D3 for Beginners
SVG, CSS3, and D3 for Beginners
 
Css grid-layout
Css grid-layoutCss grid-layout
Css grid-layout
 
The Ring programming language version 1.9 book - Part 45 of 210
The Ring programming language version 1.9 book - Part 45 of 210The Ring programming language version 1.9 book - Part 45 of 210
The Ring programming language version 1.9 book - Part 45 of 210
 
Covariance
CovarianceCovariance
Covariance
 

Recently uploaded

Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Servicesexy call girls service in goa
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girlsstephieert
 
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts servicevipmodelshub1
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGAPNIC
 
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...SofiyaSharma5
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...tanu pandey
 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)Damian Radcliffe
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607dollysharma2066
 
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With RoomVIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Roomdivyansh0kumar0
 
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024APNIC
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Sheetaleventcompany
 
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.soniya singh
 
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With RoomVIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Roomgirls4nights
 

Recently uploaded (20)

Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girls
 
Call Girls In South Ex 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In South Ex 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICECall Girls In South Ex 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In South Ex 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
 
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOG
 
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)
 
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
 
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
 
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With RoomVIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
 
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
 
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
 
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With RoomVIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
 

Css6 svg

  • 2. SVG <svg version="1.1" baseProfile="full" width="300" height="200" xmlns="http://www.w3.org/2000/svg"> <rect width="100%" height="100%" fill="red" /> <circle cx="150" cy="100" r="80" fill="green" /> <text x="150" y="125" font-size="60" text-anchor="middle" fill="white">SVG</text> </svg>
  • 3. Rectangle <rect x="10" y="10" width="30" height="30"/> <rect x="60" y="10" rx="10" ry="10" width="30" height="30"/> x The x position of the top left corner of the rectangle. y The y position of the top left corner of the rectangle. width The width of the rectangle height The height of the rectangle rx The x radius of the corners of the rectangle ry The y radius of the corners of the rectangle Circle <circle cx="25" cy="75" r="20"/> r The radius of the circle. cx The x position of the center of the circle. cy The y position of the center of the circle.
  • 4. Ellipse <ellipse cx="75" cy="75" rx="20" ry="5"/> rx The x radius of the ellipse. ry The y radius of the ellipse. cx The x position of the center of the ellipse. cy The y position of the center of the ellipse. Line <line x1="10" x2="50" y1="110" y2="150"/> x1 The x position of point 1. y1 The y position of point 1. x2 The x position of point 2. y2 The y position of point 2.
  • 5. Polyline <polyline points="60 110,60 120, 90 150, 120 120, 120 110" /> points A list of points, each number separated by a space, comma, EOL, or a line feed character. Each point must contain two numbers, an x coordinate and a y coordinate. So the list (0,0), (1,1) and (2,2) could be written: "0 0, 1 1, 2 2" Polygon <polygon points="60 110,60 120, 90 150, 120 120, 120 110" /> points A list of points, each number separated by a space, comma, EOL, or a line feed character. Each point must contain two numbers, an x coordinate and a y coordinate. So the list (0,0), (1,1) and (2,2) could be written: "0 0, 1 1, 2 2". The drawing then closes the path, so a final straight line would be drawn from (2,2) to (0,0).
  • 6. Path <path d="M150 0 L75 200 L225 200 Z" /> d A list of commands. M = moveto L = lineto H = horizontal lineto V = vertical lineto C = curveto S = smooth curveto Q = quadratic Bézier curve T = smooth quadratic Bézier curveto A = elliptical Arc Z = closepath Note: All of the commands above can also be expressed with lower letters. Capital letters means absolutely positioned, lower cases means relatively positioned.
  • 7. Path <path d="M10 10 H 90 V 90 H 10 L 10 50 " fill="transparent" stroke="black"/> L x y (or l dx dy) – line to x,y coordinate H x (or h dx) V y (or v dy) – vertical or horizontal line <path d="M10 10 H 90 V 90 H 10 L 10 50 Z" fill="transparent" stroke="black"/> Z draws a straight line from your current position back to the first point that started the path <path d="M10 10 h 80 v 80 h -80 Z" fill="transparent" stroke="black"/>
  • 8. Path <path d="M10 10 C 20 20, 40 20, 50 10" stroke="black" fill="transparent"/> <path d="M70 10 C 70 20, 120 20, 120 10" stroke="black" fill="transparent"/> <path d="M130 10 C 120 20, 180 20, 170 10" stroke="black" fill="transparent"/> <path d="M10 60 C 20 80, 40 80, 50 60" stroke="black" fill="transparent"/> <path d="M70 60 C 70 80, 110 80, 110 60" stroke="black" fill="transparent"/> <path d="M130 60 C 120 80, 180 80, 170 60" stroke="black" fill="transparent"/> <path d="M10 110 C 20 140, 40 140, 50 110" stroke="black" fill="transparent"/> <path d="M70 110 C 70 140, 110 140, 110 110" stroke="black" fill="transparent"/> <path d="M130 110 C 120 140, 180 140, 170 110" stroke="black" fill="transparent"/> C x1 y1, x2 y2, x y (or c dx1 dy1, dx2 dy2, dx dy) The last set of coordinates here (x,y) are where you want the line to end. The other two are control points. (x1,y1) is the control point for the start of your curve, and (x2,y2) for the end point of your curve. If you are familiar with algebra or calculus, the control points essentially describe the slope of your line starting at each point.
  • 9. Path <path d="M10 80 C 40 10, 65 10, 95 80 S 150 150, 180 80" stroke="black" fill="transparent"/> S x2 y2, x y (or s dx2 dy2, dx dy) S produces the same type of curve as earlier, but if it follows another S command or a C command, the first control point is assumed to be a reflection of the one used previously. If the S command doesn't follow another S or C command, then it is assumed that both control points for the curve are the same.
  • 10. Path <path d="M10 80 Q 95 10 180 80" stroke="black" fill="transparent"/> Q x1 y1, x y (or q dx1 dy1, dx dy) quadratic Bezier, it takes two arguments, the control point and the end point of the curve <path d="M10 80 Q 52.5 10, 95 80 T 180 80" stroke="black" fill="transparent"/> T x y (or t dx dy) produces the same type of curve as earlier, if follows another Q command or a T command, the control point is assumed to be a reflection of the one used previously. If the T command doesn't follow another T or Q command, then it is assumed that control point and start point for the curve are the same.
  • 11. Path <path d="M10 315 L 110 215 A 30 50 0 0 1 162.55 162.45 L 172.55 152.45 A 30 50 -45 0 1 215.1 109.9 L 315 10" stroke="black" fill="green" stroke-width="2" fill-opacity="0.5"/> A rx ry x-axis-rotation large-arc-flag sweep-flag x y a rx ry x-axis-rotation large-arc-flag sweep-flag dx Arcs are sections of circles or ellipses. For a given x- radius and y-radius, there are two ellipses that can connect any two points (as long as they're within the radius of the circle). Along either of those circles there are two possible paths that you can take to connect the points, so in any situation there are four possible arcs available. The final two arguments designate the x and y coordinates to end the stroke at.
  • 12. Colors and Lines <rect x="10" y="10" width="100" height="100" stroke="blue" fill="purple" fill-opacity="0.5" stroke-opacity="0.8"/> Fill sets the color inside the object and stroke sets the color of the line drawn around the object. Fill-opacity and stroke-opacity attributes specify the opacity of either the fill or stroke separately in SVG. <line x1="40" x2="120" y1="20" y2="20" stroke-width="20" stroke-linecap="butt"/> <line x1="40" x2="120" y1="60" y2="60" stroke-width="20" stroke-linecap="square"/> <line x1="40" x2="120" y1="100" y2="100" stroke-width="20" stroke-linecap="round"/> Stroke-width property defines the width of this stroke, the stroke is distributed evenly on both sides of the path. Stroke-linecap property controls the shape shown at the end of lines. #MyRect:hover { stroke: black; fill: blue; }
  • 13. Colors and Lines <polyline points="40 60 80 20 120 60" stroke="black" stroke-width="20" fill="none" stroke-linejoin="miter"/> <polyline points="40 140 80 100 120 140" stroke="black" stroke-width="20" fill="none" stroke-linejoin="round"/> <polyline points="40 220 80 180 120 220" stroke="black" stroke-width="20" fill="none" stroke-linejoin="bevel"/> Stroke-linejoin attribute controlled the joint where the two meet. <path d="M 10 75 Q 50 10 100 75 T 190 75" stroke-dasharray="5,10,5" fill="none"/> <path d="M 10 75 L 190 75" stroke="red" stroke-width="1" stroke-dasharray="5,5" /> stroke-dasharray attribute takes as an argument a series of comma separated numbers. Each of the numbers specifies a distance for first the filled area, and then for the unfilled area.
  • 14. Gradients <svg width="120" height="240" > <defs> <linearGradient id="Gradient1"> <stop class="stop1" offset="0%"/> <stop class="stop2" offset="50%"/> <stop class="stop3" offset="100%"/> </linearGradient> <linearGradient id="Gradient2" x1="0" x2="0" y1="0" y2="1"> <stop offset="0%" stop-color="red"/> <stop offset="50%" stop-color="black" stop-opacity="0"/> <stop offset="100%" stop-color="blue"/> </linearGradient> <style type="text/css"><![CDATA[ #rect1 { fill: url(#Gradient1); } .stop1 { stop-color: red; } .stop2 { stop-color: black; stop-opacity: 0; } .stop3 { stop-color: blue; } ]]></style> </defs> <rect id="rect1" x="10" y="10" rx="15" ry="15" width="100" height="100"/> <rect x="10" y="120" rx="15" ry="15" width="100" height="100" fill="url(#Gradient2)"/> </svg>
  • 15. Gradients <svg width="120" height="240" > <defs> <radialGradient id="Gradient1"> <stop offset="0%" stop-color="red"/> <stop offset="100%" stop-color="blue"/> </radialGradient> <radialGradient id="Gradient2" cx="0.25" cy="0.25" r="0.25"> <stop offset="0%" stop-color="red"/> <stop offset="100%" stop-color="blue"/> </radialGradient> </defs> <rect x="10" y="10" rx="15" ry="15" width="100" height="100" fill="url(#Gradient1)"/> <rect x="10" y="120" rx="15" ry="15" width="100" height="100" fill="url(#Gradient2)"/> </svg>
  • 16. Text <text x="10" y="10" text-anchor ="start" >Hello World!</text> The x and y attributes determine, where in the viewport the text will appear. The attribute text-anchor, which can have the values start, middle, end or inherit, allows to decide, in which direction the text flows from this point. <text> <tspan font-weight="bold" fill="red">This is bold and red</tspan> </text> x Set a new absolute x coordinate for the containing text. This overwrites the default current text position. The attribute may also contain a list of numbers, that are one by one applied to the single characters of the tspan element. dx Start drawing the text with a horizontal offset dx from the default current position. Here, too, you may provide a list of values that are applied to consecutive characters, hence piling up the offset over time. Likewise there are y and dy for vertical displacement. rotate Rotate all charactes by this degree. A list of numbers makes each character rotate to its respective value, with remaining characters rotating according to the last value. <path id="my_path" d="M 20,20 C 40,40 80,40 100,20" /> <text> <textPath xlink:href="#my_path">This text follows a curve.</textPath> </text>
  • 17. Transformations <rect x="0" y="0" width="10" height="10" transform="translate(30,40)" /> translate(x,y) – translate figure to the point x,y rotate(deg) – rotate figugre skewX(x) and skewY(y) – skew figugre scale(dx,dy) – scale figugre matrix(a, b, c, d, e, f) – complex transformations Grouping <g fill="red"> <rect x="0" y="0" width="10" height="10" /> <rect x="20" y="0" width="10" height="10" /> </g>