0
1

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 3 years have passed since last update.

セレクターについて改めて勉強し直した②

Posted at

はじめに

昨日の投稿の続きです。
セレクターについて改めて勉強し直した①

ここからは逆引き方式で

クラス名は違うんだけど、同じスタイルを適用させたい

html
<div class="section">テスト</div>
<p class="content">テスト</p>
css
.section, .content{}

クラス名とクラス名の間に「,」を入れる。


親要素の中の子要素にスタイルを適用させたい

html
<div>
  <p>テスト</p>
</div
css
div > p {}

divが親で
pが子。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?