Ver Mensaje Individual
  #15 (permalink)  
Antiguo 20/11/2012, 07:48
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: CSS de objeto dinámico

@Krlinhos
Quizás no entendí lo que querés hacer, pero creo que algo asi bastaría
Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  2.     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
  4. <title>Sitio en Mantenimiento</title>
  5. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  6. <style type="text/css">
  7. /*<![CDATA[*/
  8. .icono{
  9. width: 100px;
  10. height: 20px;
  11. margin: 10px 0;
  12. background: lime;
  13. cursor: pointer;
  14. }
  15. #wInfo{
  16. border: dotted 1px #666;
  17. width: 300px;
  18. height: 100px;
  19. position: absolute;
  20. top: -500px;
  21. margin: 10px;
  22. }
  23. /*]]>*/
  24.  
  25. <script type="text/javascript">
  26. //<![CDATA[
  27. function info(l,t,texto){
  28. if(l == undefined){
  29. document.getElementById('wInfo').style.top ="-500px";
  30. return false;
  31. }
  32. document.getElementById('wInfo').style.top = t + "px";
  33. document.getElementById('wInfo').style.left = l + 'px';
  34. document.getElementById('wInfo').innerHTML = texto;
  35. }
  36. //]]>
  37. </head>
  38. <div class="icono" onclick="info(100,300,'texto informativo para icono 1')">icono 1</div>
  39. <div class="icono" onclick="info(400,500,'texto informativo para icono 2')">icono 2</div>
  40. <div class="icono" onclick="info(650,50,'texto informativo para icono 3')">icono 3</div>
  41. <div id="wInfo" onclick="info();"><!-- click sobre esta capa oculta el mensaje --></div>
  42. </body>
  43. </html>
__________________
La voz de las antenas va, sustituyendo a Dios.
Cuando finalice la mutación, nueva edad media habrá
S.R.