/ Published in: CSS
URL: http://www.webintenta.com/novedades-ie7-detectar-automaticamente-que-links-son-externos-con-css.html
Por ejemplo, haciendo uso del operador ^= (que nos permite seleccionar solo aquellos elementos cuyo atributo especificado coincida, al comienzo de la cadena, con el valor especificado) podremos crear una reglas para determinar el aspecto de nuestros links en función de si son externos o internos. CSS3.
Expand |
Embed | Plain Text
/*ENLACES INTERNOS*/ a { background-color: #666; color: #FFF; font-weight: bold; text-decoration: none; padding-bottom: 1px; } a:hover { background-color: #FAF3EC; color:#666; } /*ENLACES EXTERNOS*/ a[href^="http:"] { color: #FFF; background-color: #F00; } a[href^="http:"]:hover { background-color: #FAF3EC; color:#666; }
Comments
Subscribe to comments
You need to login to post a comment.

For example, using the operator ^ = (that allows us to select only those elements which specified attribute coincides, to the beginning of the chain, with the specified value) we will be able to create one you rule to determine the aspect of our links depending on if they are external or internal. CSS3.