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.

cssの要素指定について

Posted at

以下ようなHTMLがあり、classが a かつ b であるときにstyleを指定したいときにどう指定することができるかメモとして残しておく。

<div class="a">
  <p>test a</p>
</div>

<div class="a b">
  <p>test a b</p>
</div>
.a.b {
    /* style */
    color: red;
}

上記のcssのように、クラスを空白なしで指定すると
<div class="a b"></div>を指定することができる。

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?