File: interactive-button.svg

package info (click to toggle)
python-docutils 0.22%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 11,448 kB
  • sloc: python: 53,302; lisp: 14,475; xml: 1,807; javascript: 1,032; makefile: 102; sh: 96
file content (15 lines) | stat: -rw-r--r-- 526 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<!-- https://www.petercollingridge.co.uk/tutorials/svg/interactive/button/ -->
<svg viewBox="0 0 50 22"
   xmlns="http://www.w3.org/2000/svg"
   height="2em">
    <script type="text/javascript"><![CDATA[
        function buttonClick(evt) {
            alert('Click');
        }
    ]]></script>
    <g onmouseup="buttonClick(evt)">
        <rect x="0" y="0" rx="5" ry="5" width="50" height="22"
              style="fill: #85ffdb; cursor: pointer;" />
        <text x="5" y="16" font-size="12px">Button</text>
    </g>
</svg>