Quote:
Originally Posted by Notjohn
I am intrigued by this part of the code:
<svg xmlns="http://www.w3.org/2000/svg" height="100%"
preserveAspectRatio="xMidYMid meet" version="1.1"
viewBox="0 0 SGC_IMAGE_WIDTH SGC_IMAGE_HEIGHT" width="100%"
Somehow it never occurred to me that one could specify width, height, and at the same time preserveAspectRatio. Does this mean that the lesser of width or height will rule (i.e., if 100% width fills the screen before 100% height does, then there will be white space above and below the cover image)?
|
There are two ways it can work. See SVG or our wiki for details. One way to have "white" space on two sides of the device while the other is to crop the image to fit. Both preserve aspect ratio.
Dale