HTML and CSS Reference
In-Depth Information
A - red
N - yellow
M - green
C - blue
O - purple
I - orange
Enter the style element shown in Listing 9-3 inside the svg element before the foreach loop.
Listing 9-3. Adding basic fill definitions
<style type="text/css" >
<![CDATA[
path
{
stroke: black;
fill: khaki;
}
path[id^="A"]
{
fill: red;
}
path[id^="N"]
{
fill: yellow;
}
path[id^="M"]
{
fill: green;
}
path[id^="C"]
{
fill: blue;
}
path[id^="O"]
{
fill: purple;
}
path[id^="I"]
{
fill: orange;
}
]]>
</style>
Press F5 to start the application and then click the “Go to map” link. The map should now look like
Figure 9-14 .
Search WWH ::




Custom Search