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
  • 7,596
  • 15
  • 68
  • 133

1 Answers1

4

It should be as simple as this:

ul li img {
  opacity: 0;
}

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