Comunidad de diseño web y desarrollo en internet online

Boton CSS con Hover ¿Tiene setnido?

Citar            
MensajeEscrito el 09 Nov 2010 09:27 am
Muy buenas, hace un tiempo ví un tuto para que, con un mismo gif/jpg. hacer un botón con dos estados.

Como no me acordaba, he hecho esto:

Código HTML :

<style type="text/css">
#contenedor{margin:50px auto;}
.boton{
      cursor:pointer;
      width:100px;
      height:29px;
      margin:auto
      ;overflow:hidden;
      background:url(pulsa.png);
}
.boton:hover{
      cursor:pointer;
      background:url(pulsa.png) bottom;}

</style>

--------------Body--------------
<div id="contenedor">
      <a href="#"><div class="boton"></div></a>
</div>




¿Está bien así?

P.D-> http://prueba-zencart.netne.net/boton/boton.html Aquí he puesto el ejemplo.

Por charliechin

19 de clabLevel



 

chrome
Citar            
MensajeEscrito el 09 Nov 2010 11:37 am
este tutorial?
podrias hacerlo tambien (funciona mejor para cuando son muchas imagenes) asi

Por tribak

Claber

2448 de clabLevel

6 tutoriales

Genero:Masculino   Héroes

Fotógrafo o algo

firefox
Citar            
MensajeEscrito el 10 Nov 2010 09:36 am
Si!! Mil gracias Tribak! Desconocía el 2º tuto :)

Por charliechin

19 de clabLevel



 

chrome
Citar            
MensajeEscrito el 15 Nov 2010 09:29 pm
la primera opcion es totalmente valida, lo que en cuanto a accesibilidad no es buena idea utilizar imagenes para un menu.

Por sgerman7

48 de clabLevel



Genero:Masculino  

firefox
Citar            
MensajeEscrito el 30 Nov 2010 08:04 am
Ni poniendole un 'title' en la imágen?

Por charliechin

19 de clabLevel



 

chrome
Citar            
MensajeEscrito el 30 Nov 2010 10:23 am
bueno mas que title deberías poner el atributo alt

Por sgerman7

48 de clabLevel



Genero:Masculino  

chrome

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.