HTML and CSS Reference
In-Depth Information
Figure 14-3: SVG patterns.
Listing 14-3: An example SVG pattern
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>SVG Patterns</title>
</head>
<body>
<svg id="mysvg" xmlns="http://www.w3.org/2000/svg" version="1.1"
width="800" height="800" >
<defs>
<pattern id="pattern-test" patternUnits="userSpaceOnUse"
x="0" y="0" width="50" height="50"
viewBox="0 0 10 10" >
<circle cx="5" cy="5" r="5" fill="black" />
<polyline points="0,0 10,10" stroke="white" stroke-width="2"/>
</pattern>
</defs>
<ellipse fill="url(#pattern-test)" stroke="black" stroke-width="5"
cx="400" cy="200" rx="350" ry="150" />
</svg>
</body>
</html>
Again the full specification has some less-used options you can take a look at that this topic doesn't have
space to cover.
 
 
Search WWH ::




Custom Search