I want to set attributes to “span” element when the mouse move over “a” element
Here is my code:
<body>
<div id="wrapper">
<div id="leftmenu">
<li><a id="menu1" href="#"><span class="iconic menu11"></span></a></li>
<li><a id="menu2" href="#"><span class="iconic menu22"></span></a></li>
<li><a id="menu3" href="#"><span class="iconic menu33"></span></a></li>
<li><a id="menu4" href="#"><span class="iconic menu44"></span></a></li>
</div>
</div>
</body>
#leftmenu li a span{
text-align:center;
font-size:45px;
line-height:45px;
color: transparent;
background-color: #CF9D9B;
-webkit-background-clip: text;
background-clip: text;
text-shadow: rgba(255,255,255,0.5) 0 1px 2px;
}
this not working:
#leftmenu li a:hover span {
color: transparent;
background-color: #0000;
}
You have four 0’s in your hover background-color definition; change it to 3 (shorthand) or 6 (full hex colour code).
That then works for me if I put something in a span to see – e.g. http://jsfiddle.net/sync/QKn9v/