SHARE
TWEET

Sapph

a guest Feb 17th, 2011 1,927 Never
  1. <!DOCTYPE html>
  2. <html>
  3.     <head>
  4.         <style type="text/css">
  5.  
  6.         body
  7.         {
  8.             background: gray;
  9.         }
  10.  
  11.         polygon.hoverable
  12.         {
  13.             fill: transparent;
  14.             stroke: darkgray;
  15.             stroke-width: 4;
  16.             cursor: pointer;
  17.         }
  18.  
  19.         polygon.hoverable:hover
  20.         {
  21.             stroke:black;
  22.         }
  23.  
  24.         </style>
  25.     </head>
  26.     <body>
  27.         <p>Gray initial outline added for visibility. Can replace with 'none'.</p>
  28.         <svg version="1.1" xmlns="http://www.w3.org/2000/svg">
  29.             <polygon class="hoverable" points="220,100 300,210 170,250"
  30.                onclick="alert('I am click functionality!');"/>
  31.         </svg>
  32.     </body>
  33. </html>
RAW Paste Data
Top