SlideShare a Scribd company logo
1 of 29
Download to read offline
Web講座 第3回
前回のおさらい
セレクタについて
擬似クラス・擬似要素について
「マージン」と「パディング」について
次回の講座
前回の講座では、タグ・要素・属性と
CSSの基本的な記述について説明しました。
要素名にCSSを適用する
指定したidにCSSを適用する
指定したクラスにCSSを適用する
前回の講座では
要素型セレクタ・idセレクタ・classセレクタ
について説明しました。
この3つのセレクタの他にも子孫セレクタや子セレクタなど
スタイルを指定する上で様々なセレクタがある。
全称セレクタ ~すべての要素に適用~
複数セレクタ ~複数のセレクタに適用~
子孫セレクタ ~要素の下の階層にあるセレクタに適用~
子セレクタ ~直下の階層にあるセレクタのみ適用~
隣接セレクタ ~同じ階層のある要素の直後にある要素に適用~
下のように表示されたでしょうか?
子セレクタや子孫セレクタなどをうまく使うことで
綺麗に記述することができます
擬似クラスは要素の状況の変化に応じて
スタイルを適用したいときに使用する。
擬似要素は要素内の特定の文字や行に
スタイルを適用したいときに使用する。
擬似クラスと擬似要素は次のように記述します。
要素名:擬似クラス{
}
要素名:擬似要素{
}
:link擬似クラス ~:linkはリンク先が未訪問の場合に適用~
:linkはaタグのみ適用されます。
:visited擬似クラス ~:visitedはリンク先が訪問済みの場合に適用~
:visitedはaタグのみ適用されます。
:hover擬似クラス ~:hoverは要素の上にカーソルがある時に適用~
:active擬似クラス
~:activeは要素がアクティブになっている時に適用~
:before擬似要素 ~:beforeは要素の前に指定した内容を追加~
:after擬似要素 ~:afterは要素の後に指定した内容を追加~
マージンは外側の余白で、パディングは内側の余白
テキスト
マージン
マージン
パディング パディング
マ
ー
ジ
ン
マ
ー
ジ
ン
height
width
6月3日
GitHubについて

More Related Content

Viewers also liked

後期第八回ネットワークチーム講座資料
後期第八回ネットワークチーム講座資料後期第八回ネットワークチーム講座資料
後期第八回ネットワークチーム講座資料densan_teacher
 
OpManager導入事例 日テレITプロデュース様
OpManager導入事例 日テレITプロデュース様OpManager導入事例 日テレITプロデュース様
OpManager導入事例 日テレITプロデュース様ManageEngine, Zoho Corporation
 
第三回ネットワークチーム講座資料
第三回ネットワークチーム講座資料第三回ネットワークチーム講座資料
第三回ネットワークチーム講座資料densan_teacher
 
Presentation libertagia-beta-1-131204033511-phpapp01
Presentation libertagia-beta-1-131204033511-phpapp01Presentation libertagia-beta-1-131204033511-phpapp01
Presentation libertagia-beta-1-131204033511-phpapp01Pratheesh Kumar
 
Web講座 第10回
Web講座 第10回Web講座 第10回
Web講座 第10回nanametown
 
Web講座 第8回
Web講座 第8回Web講座 第8回
Web講座 第8回nanametown
 
Presentation libertagia-beta-1-131204033511-phpapp01
Presentation libertagia-beta-1-131204033511-phpapp01Presentation libertagia-beta-1-131204033511-phpapp01
Presentation libertagia-beta-1-131204033511-phpapp01Pratheesh Kumar
 
Web講座 第9回
Web講座 第9回Web講座 第9回
Web講座 第9回nanametown
 
Web講座 第4回
Web講座 第4回Web講座 第4回
Web講座 第4回nanametown
 
Web講座 第6回
Web講座 第6回Web講座 第6回
Web講座 第6回nanametown
 
Cybersecurity organisations teodora_stoikova_500113
Cybersecurity organisations teodora_stoikova_500113Cybersecurity organisations teodora_stoikova_500113
Cybersecurity organisations teodora_stoikova_500113teodora_stoikova91
 
عناصر المنهج
عناصر المنهجعناصر المنهج
عناصر المنهجasmanm
 
Presentation cybersecurity organsation_teodora_stoikova_500113
Presentation cybersecurity organsation_teodora_stoikova_500113Presentation cybersecurity organsation_teodora_stoikova_500113
Presentation cybersecurity organsation_teodora_stoikova_500113teodora_stoikova91
 
GCR : POWER POINT PRESENTATION
GCR : POWER POINT PRESENTATIONGCR : POWER POINT PRESENTATION
GCR : POWER POINT PRESENTATIONPratheesh Kumar
 
Welcome to Crypto Currency Platform, GCR The Next BitCoin
Welcome to Crypto Currency Platform, GCR The Next BitCoinWelcome to Crypto Currency Platform, GCR The Next BitCoin
Welcome to Crypto Currency Platform, GCR The Next BitCoinPratheesh Kumar
 

Viewers also liked (17)

後期第八回ネットワークチーム講座資料
後期第八回ネットワークチーム講座資料後期第八回ネットワークチーム講座資料
後期第八回ネットワークチーム講座資料
 
OpManager導入事例 日テレITプロデュース様
OpManager導入事例 日テレITプロデュース様OpManager導入事例 日テレITプロデュース様
OpManager導入事例 日テレITプロデュース様
 
第三回ネットワークチーム講座資料
第三回ネットワークチーム講座資料第三回ネットワークチーム講座資料
第三回ネットワークチーム講座資料
 
Presentation libertagia-beta-1-131204033511-phpapp01
Presentation libertagia-beta-1-131204033511-phpapp01Presentation libertagia-beta-1-131204033511-phpapp01
Presentation libertagia-beta-1-131204033511-phpapp01
 
Web講座 第10回
Web講座 第10回Web講座 第10回
Web講座 第10回
 
Web講座 第8回
Web講座 第8回Web講座 第8回
Web講座 第8回
 
Saumitra resume 052014_cc
Saumitra resume 052014_ccSaumitra resume 052014_cc
Saumitra resume 052014_cc
 
Presentation libertagia-beta-1-131204033511-phpapp01
Presentation libertagia-beta-1-131204033511-phpapp01Presentation libertagia-beta-1-131204033511-phpapp01
Presentation libertagia-beta-1-131204033511-phpapp01
 
Web講座 第9回
Web講座 第9回Web講座 第9回
Web講座 第9回
 
Web講座 第4回
Web講座 第4回Web講座 第4回
Web講座 第4回
 
Web講座 第6回
Web講座 第6回Web講座 第6回
Web講座 第6回
 
Cybersecurity organisations teodora_stoikova_500113
Cybersecurity organisations teodora_stoikova_500113Cybersecurity organisations teodora_stoikova_500113
Cybersecurity organisations teodora_stoikova_500113
 
عناصر المنهج
عناصر المنهجعناصر المنهج
عناصر المنهج
 
Rare flowers.e
Rare flowers.eRare flowers.e
Rare flowers.e
 
Presentation cybersecurity organsation_teodora_stoikova_500113
Presentation cybersecurity organsation_teodora_stoikova_500113Presentation cybersecurity organsation_teodora_stoikova_500113
Presentation cybersecurity organsation_teodora_stoikova_500113
 
GCR : POWER POINT PRESENTATION
GCR : POWER POINT PRESENTATIONGCR : POWER POINT PRESENTATION
GCR : POWER POINT PRESENTATION
 
Welcome to Crypto Currency Platform, GCR The Next BitCoin
Welcome to Crypto Currency Platform, GCR The Next BitCoinWelcome to Crypto Currency Platform, GCR The Next BitCoin
Welcome to Crypto Currency Platform, GCR The Next BitCoin
 

Web講座 第3回