Ver Mensaje Individual
  #2 (permalink)  
Antiguo 17/01/2002, 17:42
Avatar de mikel_gomez
mikel_gomez
 
Fecha de Ingreso: febrero-2001
Mensajes: 482
Antigüedad: 23 años, 1 mes
Puntos: 3
Re: Enlaces con distintos colores?

Prueba este ejemplo completo con tres formas de especificar estilos para enlaces:

<pre>&lt;html&gt;
&lt;head&gt;
&lt;style type=&quot;text/css&quot;&gt;
&lt;!-- A:link Especifica el estilo de los enlaces no visitados. --&gt;
&lt;!-- A:hover Indica el estilo del enlace cuando nos situamos sobre él. --&gt;
&lt;!-- A:visited Hace referencia a los enlaces ya visitados. --&gt;
a:link {color: black; }
a:hover {color: red; }
a:visited {color: yellow; }
a:link.e1 {color: green; text-decoration: none;}
a:hover.e1 {color: red; background-color: yellow; font-weight: bold;}
a:visited.e1 {color: yellow; font-weight: normal;}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
Ejemplo de estilos en enlaces
&lt;hr /&gt;&lt;br /&gt;
Estilo definido por defecto:&lt;br /&gt;
&lt;a href=&quot;direccion&quot;&gt;Enlace 1&lt;/a&gt;
&lt;br /&gt;&lt;br /&gt;
Estilo definido para clase e1:&lt;br /&gt;
&lt;a href=&quot;direccion&quot; class=&quot;e1&quot;&gt;Enlace 2&lt;/a&gt;
&lt;br /&gt;&lt;br /&gt;
Estilo definido en el propio enlace:&lt;br /&gt;
&lt;a href=&quot;direccion&quot; style=&quot;color: pink;&quot;&gt;Enlace 3&lt;/a&gt;
&lt;/body&gt;
&lt;/html&gt; </pre>

Saludos.

<style>.t{font: 8pt verdana; text-decoration: none; color: black;}</style><hr><span class="t"><a href="mailto:[email protected]" class="t" style="font: 10pt;">Mikel Gómez</a><br>Hay que aprender mucho para saber poco.</span>