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

Chapter 15. Scripting SVG > Changing style Attributes

Changing style Attributes

If you want to change the style attributes of your document, you have several possible ways to do so. The techniques also depend on how you integrate style elements into your SVG document.

Styles in Attributes

Not all the text elements in our digital clock example have a style attribute, but several styles have been applied using the appropriate attributes. Let's look at the font size, for example. It has been set using the font-size attribute. Thus, if you want to change the font size, you can use getAttribute and setAttribute(), as you have seen before.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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