Reputation: 468
How can I append my span to also be effected by my hover transition. I'm trying to get the text from the span to also fade like the image when there is a mouseover
#grid li span {
color: white;
display:block;
bottom:250px;
position:relative;
width:180px;
}
#grid li {
float: left;
margin: 0 40px 75px 0px;
display:inline;
position:relative;
}
#grid li a:hover img {
-webkit-transition: opacity .3s ease-in;
-moz-transition: opactiy .3s ease-in;
-ms-transition: opacity .3s ease-in;
-o-transition: opacity .3s ease-in;
transition: opacity .3s ease-in;
opacity: 1;
}
#grid:hover img {
-webkit-transition: opacity .3s ease-in;
-moz-transition: opactiy .3s ease-in;
-ms-transition: opacity .3s ease-in;
-o-transition: opacity .3s ease-in;
transition: opacity .3s ease-in;
zoom: 1;
filter: alpha(opacity=100);
opacity: 0.3;
}
Upvotes: 0
Views: 72
Reputation: 21725
Modify your CSS so all li
fade. Then target the one that is being hovered.
Change
#grid:hover img {
...transitions...
}
to
#grid:hover li {
...transitions...
}
and add
#grid:hover li:hover {
opacity: 1;
}
Upvotes: 1