Adding Scroll Bars to SVG Web Pages

One of the disappointments of the Adobe SVG Viewer, at least for me, has been the omission of scroll bars (still missing as of version 2.0) when SVG images are displayed on their own as Web pages (see Chapter 12, “Creating a Simple SVG Web Site”). That omission contrasts with the many successes of the Adobe viewer. However, overcoming the omission is simple: Use the HTML <embed> element to provide scroll bars for a large SVG image, as Listing 10.3 shows.

Listing 10.3. (ScrollBars01.html)
 <html> <head> <meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> <title>An SVG Web Page which seems to have scroll bars!</title> </head> <body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0"> ...

Get Designing SVG Web Graphics now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.