Skip to main content
100%

Shapes and Colors with SVG and CSS

✓ Published0🌍 Public
Wwen787
Last edited Jun 24, 2019
Created on Jun 24, 2019

This example demonstrates basic SVG shapes with CSS styling, showing how circles, rectangles, lines, and paths render with different fill and stroke properties. The code uses raw SVG elements within an HTML document, applying presentation attributes like `fill`, `stroke`, and `stroke-width` directly on shapes and grouped elements. A CSS stylesheet defines additional styling rules for elements with the `.lines` class, including rounded line joins and caps. The SVG viewport is set to 960 by 500 pixels, with shapes positioned at various coordinates using the `transform` attribute for group-level translation.

AI-generated description

An example including some commonly used features of SVG.

MIT Licensed

Similar vizzes