| 1 | <svg |
| 2 | xmlns='http://www.w3.org/2000/svg' |
| 3 | xmlns:svg='http://www.w3.org/2000/svg' |
| 4 | width='400' |
| 5 | height='300'> |
| 6 | <svg |
| 7 | x='0' |
| 8 | y='0' |
| 9 | width='80' |
| 10 | height='80' |
| 11 | viewBox='0 0 100 100' |
| 12 | preserveAspectRatio='xMinYMin'> |
| 13 | <rect |
| 14 | fill='rgb(255,0,0)' |
| 15 | x='0' |
| 16 | y='0' |
| 17 | width='100' |
| 18 | height='100'> |
| 19 | </rect> |
| 20 | </svg> |
| 21 | <svg |
| 22 | x='100' |
| 23 | y='0' |
| 24 | width='80' |
| 25 | height='80' |
| 26 | viewBox='0 0 100 100' |
| 27 | preserveAspectRatio='xMidYMid'> |
| 28 | <rect |
| 29 | fill='rgb(0,0,255)' |
| 30 | x='0' |
| 31 | y='0' |
| 32 | width='100' |
| 33 | height='100'> |
| 34 | </rect> |
| 35 | </svg> |
| 36 | <svg |
| 37 | x='200' |
| 38 | y='0' |
| 39 | width='80' |
| 40 | height='80' |
| 41 | viewBox='0 0 100 100' |
| 42 | preserveAspectRatio='xMaxYMax'> |
| 43 | <rect |
| 44 | fill='rgb(0,128,0)' |
| 45 | x='0' |
| 46 | y='0' |
| 47 | width='100' |
| 48 | height='100'> |
| 49 | </rect> |
| 50 | </svg> |
| 51 | <svg |
| 52 | x='0' |
| 53 | y='100' |
| 54 | width='120' |
| 55 | height='60' |
| 56 | viewBox='0 0 100 100' |
| 57 | preserveAspectRatio='none'> |
| 58 | <circle |
| 59 | fill='rgb(255,255,0)' |
| 60 | cx='50' |
| 61 | cy='50' |
| 62 | r='50'> |
| 63 | </circle> |
| 64 | </svg> |
| 65 | <svg |
| 66 | x='150' |
| 67 | y='100' |
| 68 | width='60' |
| 69 | height='120' |
| 70 | viewBox='0 0 100 100' |
| 71 | preserveAspectRatio='xMidYMid slice'> |
| 72 | <rect |
| 73 | fill='rgb(128,0,128)' |
| 74 | x='0' |
| 75 | y='0' |
| 76 | width='100' |
| 77 | height='100'> |
| 78 | </rect> |
| 79 | </svg> |
| 80 | </svg> |