Skip to main content
100%

Just some width/height stuff

✓ Published0🌍 Public
Ccyro666
Last edited Mar 19, 2020
Created on Mar 19, 2020

This example displays a full-window rounded rectangle whose dimensions adapt to the current browser viewport. The SVG canvas is sized to match the body’s client width and height, and a single `<rect>` is appended with the same dimensions and a 40-pixel corner radius. The code uses `d3.select` to target the SVG element, `d3.attr` to set the width and height, and CSS fixed positioning to remove page scrolling. The rectangle fills the entire screen, creating a simple, responsive background effect.

AI-generated description
MIT Licensed

Similar vizzes