Source code
Revision control
Copy as Markdown
Other Tools
<!doctype html>
<link rel="stylesheet" href="/fonts/ahem.css"/>
<style>
body { margin: 0 }
:root {
font-size: 10px;
}
.container {
font-size: 20px;
}
line {
stroke-width: 40px;
stroke: lime;
}
polygon, polyline, text {
fill: lime;
}
text {
font: 40px/1 Ahem;
}
svg {
background-color: red;
}
</style>
<div class="container">
<svg width=400 height=400>
<defs>
<path id="p" d="M320,240H100"/>
</defs>
<rect width=400 height=400 fill="blue"/>
<line y1=0 y2=0 x1=0 x2=200 />
<line y1=40 y2=40 x1=0 x2=10em />
<line y1=80 y2=80 x1=0 x2=20rem />
<line y1=120 y2=120 x1=0 x2=50% />
<line y1=160 y2=160 x1=0 x2=4vw />
<polygon points="0,200 200,200 200,240 0,240"/>
<polyline points="0,240 200,240 200,280 0,280"/>
<text x=320 y=240>X</text>
<text><textPath href="#p">X</textPath></text>
</svg>
</div>