svg_inline.rml 915 B

1234567891011121314151617181920212223242526272829303132
  1. <rml>
  2. <head>
  3. <title>SVG Inline</title>
  4. <link type="text/template" href="/assets/window.rml" />
  5. <style>
  6. body {
  7. width: 300px;
  8. height: 225px;
  9. margin: auto;
  10. left: -400px;
  11. top: 200px;
  12. }
  13. svg {
  14. display: inline;
  15. }
  16. button {
  17. display: block;
  18. margin: 0 auto;
  19. }
  20. </style>
  21. </head>
  22. <body template="window" data-model="svg_test_model">
  23. <svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" id="svg_1">
  24. <circle cx="25" cy="25" r="20" stroke="black" stroke-width="3" fill="red" />
  25. </svg>
  26. <svg width="50" height="50" data-rml="svg_data"></svg>
  27. <svg width="50" height="50" data-rml="'<circle cx=&quot;25&quot; cy=&quot;25&quot; r=&quot;20&quot; stroke=&quot;' + line_color + '&quot; stroke-width=&quot;3&quot; fill=&quot;' + fill_color + '&quot; />'"></svg>
  28. <button data-event-click="toggle_svg">Click Me</button>
  29. </body>
  30. </rml>