0

Is there an easy way to do this with css?

I have a list like so..

<ul>
   <li><img src="..."><li>
<ul>

Now the default css for this is..

ul li img{
   opacity: 0;
}

how can I set the opacity: 1; if you hover over the list item??

Smokey Dawson
  • 8,827
  • 19
  • 77
  • 152

1 Answers1

4

It should be as simple as this:

ul li img {
  opacity: 0;
}

ul li:hover img {
  opacity: 1;
}
Josh McMillan
  • 724
  • 3
  • 8