LOGOS DE GRIS A COLOR (RESULETO SOLUCION)

http://css3.bradshawenterprises.com/cfimg/

DEMO 5

Demo 5 – Animating the background-image property

Right now this only works on webkits built from 2012 onwards. It’s not part of the spec (yet?).

Plan

  1. Make a div with a width and height
  2. Change the background-image property

Demo

Code

This only works on Chrome 18+ and on Webkit built in 2012 onwards, including iOS6. It seems to be a side effect of the CSS4 crossfading work, though this is a lot more useful.

<div id="cf6_image" class="shadow"></div>

Then the CSS:

#cf6_image {
  margin:0 auto;
  width:450px;
  height:281px;
  transition: background-image 1s ease-in-out;
  background-image:url("/images/Windows%20Logo.jpg");
}

#cf6_image:hover {
  background-image:url("/images/Turtle.jpg");
}

Pretty cool – this can easily be extended by simply changing the background-image property with JS, and makes things much much simpler. I’m not sure if this behaviour is part of the spec or not, and I haven’t seen support anywhere other than in the afore mentioned browsers.

For a slightly more detailed example, have a look at a simple gallery using filters and fades.

http://www.forosdelweb.com/f53/insertar-imagen-por-medio-css-487079/

Antiguo 04/05/2007, 00:43
Avatar de JavierB
Colaborador
Fecha de Ingreso: febrero-2002
Ubicación: Madrid
Mensajes: 25.052
Antigüedad: 16 años, 7 meses
Puntos: 772
Re: insertar imagen por medio de un css?

Hola eschwartz

La única forma de utilizar una imagen con Css es poniéndola de fondo. Si no quieres que se repita puedes ponerlo así:

background: url(‘1.jpg’) no-repeat;

Saludos, 

__________________
Lee las Políticas del Foro y escribe correctamente.

https://mosaic.uoc.edu/ac/le/es/m6/ud5/index.html

.alert{
   background-color: #FFFFCC;
   background-image: url(alert.png);
   background-repeat: no-repeat;
}

www.piergrafico.com