html,body,svg { height:100% }

by Abhishek Hingu

HTML

<!-- Learn about this code on MDN: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill-opacity -->

<svg viewBox="0 0 400 100" xmlns="http://www.w3.org/2000/svg">
  <!-- Default fill opacity: 1 -->
  <circle cx="50" cy="50" r="40" />

  <!-- Fill opacity as a number -->
  <circle cx="150" cy="50" r="40"
          fill-opacity="0.7" />

  <!-- Fill opacity as a percentage -->
  <circle cx="250" cy="50" r="40"
          fill-opacity="50%" />
 
  <!-- Fill opacity as a CSS property -->
  <circle cx="350" cy="50" r="40"
          style="fill-opacity:0;" />
</svg>

CSS

html,body,svg { height:100% }