Compass 使用
$mouseover:.15s;
a {
& ,
&:before ,
&:after {
@include transition(background-color $mouseover linear,background-image $mouseover linear);
}
> * {
@include transition(opacity $mouseover linear);
}
img {
background:#fff;
}
&:hover {
text-decoration:underline;
> * {
@include opacity(0);
text-decoration:none;
}
}
}
a{リンクテキスト}
の場合、a:hover
にマウスオーバー画像・色指定。
a:before
/ a:after
の場合、a:hover:before
/ a:hover:before
にマウスオーバー画像指定。
* > a > img
の場合、*
/ a
にマウスオーバー画像・色指定。
いい感じにマウスオーバーしてくれるはず。