Reputation: 1018
Here is my css:
#sort_dropdown:hover > .arrow{
-webkit-transform: translate(0,-42px);
-moz-transform: translate(0,-42px);
-o-transform: translate(0,-42px);
transform: translate(0,-42px);
}
here is my code:
<li><a id="sort_dropdown">Sortieren <span class="arrow">↓</span><span class="arrow" style="display: none;">↑</span></a>
Upvotes: 3
Views: 6909
Reputation: 16456
Transforms only work on elements with block-level display. Setting .arrow
to display: inline-block
(spans display inline
by default) does the trick (jsFiddle demo):
.arrow {
display: inline-block;
}
Upvotes: 12