Kayote
Kayote

Reputation: 15647

Generating SVG pattern from the centre

I am creating a grid pattern (as per this solution) on the whole viewport.

The grid is generated from the top-left of the viewport, however, I want to generate it from the middle of the screen so that it consumes the whole screen yet is aligned from the centre. How can I achieve this?

Upvotes: 0

Views: 89

Answers (1)

Bas van Dijk
Bas van Dijk

Reputation: 10713

You need to change the x and y attributes of your SVG pattern. This website explains how you can various alignments for your SVG pattern:

http://tutorials.jenkov.com/svg/fill-patterns.html

Upvotes: 1

Related Questions