Advertisement
pcwizz

svg

Jun 17th, 2014
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 1.04 KB | None | 0 0
  1. <html>
  2. <head>
  3. <style>
  4.     svg{
  5.         box-shadow: -3px 3px 3px #aaa;
  6.     }
  7.     rect{
  8.         stroke: #000;
  9.         fill: #fff;
  10.     }
  11.     text{
  12.         font-size: 12px;
  13.         font-family: serif;
  14.         font-weight: normal;
  15.     }
  16.     line{
  17.         stroke:#000;
  18.     }
  19. </style>
  20. </head>
  21. <body>
  22. <svg width="400" height="200">
  23.     <!--Create vertices-->
  24.     <rect x="170" y="0" width="60" height="50"></rect>
  25.     <text x="180" y="25">Vertex1</text>
  26.     <rect x="70" y="70" width="60" height="50"></rect>
  27.     <text x="80" y="95">Vertex2</text>
  28.     <rect x="270" y="70" width="60" height="50"></rect>
  29.     <text x="280" y="95">Vertex3</text>
  30.     <rect x="170" y="140" width="60" height="50"></rect>
  31.     <text x="180" y="165">Vertex4</text>
  32.     <!--Create edges-->
  33.     <line x1="200" x2="100" y1="50" y2="70"></line>
  34.     <text x="143" y="57">1</text>
  35.     <line x1="200" x2="300" y1="50" y2="70"></line>
  36.     <text x="247" y="57">2</text>
  37.     <line x1="300" x2="200" y1="120" y2="140"></line>
  38.     <text x="243" y="127">5</text>
  39. </svg>
  40. </body>
  41. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement