LoginSignup
13
13

More than 5 years have passed since last update.

ぼくがかんがえたさいきょうのマウスオーバー

Last updated at Posted at 2014-06-04

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 にマウスオーバー画像・色指定。

いい感じにマウスオーバーしてくれるはず。

13
13
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
13