Quantcast
Channel: MobileRead Forums
Viewing all articles
Browse latest Browse all 50094

Do SVGs have to be wrapped in DIVs?

$
0
0
Most sample code shows SVG in ePub wrapped in DIVs, e.g. for a full page image:

Code:

<div>
    <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" preserveAspectRatio="xMidYMid meet" viewBox="0 0 783 1200" xmlns:xlink="http://www.w3.org/1999/xlink">
        <image width="783" height="1200" xlink:href="../Images/cover.jpg" />
    </svg>
</div>

A few questions:
  1. Is such a wrapper necessary?
  2. Is it necessary both for full page and for inline images?
  3. Is it necessary also if the SVG doesn't contain a pixel image but only vector code?
  4. Does the wrapper have to be styled in any way?

Viewing all articles
Browse latest Browse all 50094

Latest Images

Trending Articles



Latest Images