79631393

Date: 2025-05-21 01:56:36
Score: 0.5
Natty:
Report link

This is what the <view> tag on an SVG is defined for. It lets you essential define "windows" into your SVG that can be linked.

example.svg

<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="300" height="300">
  <defs>
    <!-- width/height should match viewBox -->
    <view id="circle" width="100" height="100" viewBox="75 50 100 100"/>
    <view id="square" width="120" height="120" viewBox="10 10 120 120"/>
  </defs>

  <circle cx="125" cy="100" r="50" fill="red" />
  <rect x="20" y="20" width="100" height="75" fill="blue" />
</svg>

<img src="example.svg"/>

full image

<img src="example.svg#square"/>

square anchor

<img src="example.svg#circle"/>

circle anchor

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Evidlo