Ver Mensaje Individual
  #2 (permalink)  
Antiguo 09/10/2012, 08:23
Avatar de emprear
emprear
Colaborador
 
Fecha de Ingreso: junio-2007
Ubicación: me mudé
Mensajes: 8.388
Antigüedad: 16 años, 10 meses
Puntos: 1567
Respuesta: Darle coordenada y a un elemento svg

Podés posicionarlos dandole el top ya sea por css o con javascript
Solo te resta determinar a que elementos
Ejemplo

Código HTML:
Ver original
  1. <!DOCTYPE html>
  2. <title>SVG</title>
  3. <meta charset="utf-8" />
  4. <style type="text/css">
  5. /*<![CDATA[*/
  6. h1{
  7. text-align: center;
  8. }
  9. svg{
  10. border: solid 1px #999;
  11. }
  12. #svgelem{
  13. position: absolute;
  14. top: 0;
  15. }
  16.  
  17. /*]]>*/
  18.  
  19. <script type="text/javascript">
  20. //<![CDATA[
  21. function posicionar(){
  22. var svg = document.getElementById('svgelem_2');
  23. svg.style.position = 'absolute';
  24. svg.style.top = '200px';
  25. }
  26.  
  27. //]]>
  28. </head>
  29. <body onload="posicionar();">
  30. <h1>HTML5 SVG</h1>
  31. <svg id="svgelem" height="200" xmlns="http://www.w3.org/2000/svg">
  32.     <circle id="redcircle" cx="50" cy="50" r="50" fill="red" />
  33. </svg>
  34.  
  35.  
  36. <svg width="640" height="480" xmlns="http://www.w3.org/2000/svg" id="svgelem_2">
  37.  <!-- Created with SVG-edit - http://svg-edit.googlecode.com/ -->
  38.  <g>
  39.   <title>Capa 1</title>
  40.   <rect transform="rotate(37.5686, 244, 235.5)" id="svg_1" height="177.392153" width="255.685329" y="146.803932" x="116.157328" stroke-width="5" stroke="#000000" fill="#FF0000"/>
  41.  </g>
  42. </svg>
  43. </body>
  44. </html>
__________________
La voz de las antenas va, sustituyendo a Dios.
Cuando finalice la mutación, nueva edad media habrá
S.R.