• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 4. Using CSS with SVG > Internal CSS Style Sheets

Internal CSS Style Sheets

The third technique for applying style is to create an internal CSS style sheet nested within the defs element.

The basic structure of an internal style sheet is shown in Listing 4.8. Notice the CDATA section within the style element. CSS rules do not follow the syntax requirements of XML, and therefore the SVG rendering engine must be told that the CSS style rules are not to be treated as XML. The CDATA section marks its content as not being appropriate to parse as XML.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint