0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【Sass】リンクの時だけ、hoverをする

Last updated at Posted at 2022-06-22

概要

同じパーツでも、リンクの時、リンクではなく通常パーツの時があるかと思います。
そんな時に使用できるコードを書きます。

&[href] {
    @media screen and (min-width: 768px) {
        &:hover {
            background-color: blue;
        }
    }
}

リンク(href)の時、且つスマホのサイズ以上の時、で設定をしていきます。

0
0
0

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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?