SlideShare a Scribd company logo
【一日でできる】初心者
のホームページ制作
~CSS(応用)編~
マロン先生
よーし!
今回は、様々な装飾を行ってもらう。
前回のファイルを開くのだ。
ブラック君
応用編か。。
頑張ってついて行って、カッコいい
ホームページを作るぞ!
マロン先生
下準備として、なんでもいいから好きな画像
をダウンロードしておいてくれ。
同じフォルダに保存することを忘れるなよ。
ブラック君
好きな画像か。。。
著作権に気を付けてフリー素材を見つけよ。
この画像に決めた。
マロン先生
下準備はこんなもんだ。
ではその画像を背景画像に設定するのだ。
ブラック君
えっ!?そうだったんですか??
でも装飾ってなんだか難しそう。。
できるかな・・・・
マロン先生
下準備はこんなもんだ。
ではその画像を背景画像に設定するのだ。
body{
background-image:url(“画像の名前”);
}
マロン先生
Bodyというのは基本的に画面全体を示す。
以下のコードが、背景画像の設定なのだ。
body{
background-image:url(“画像の名前”);
}
マロン先生
Bodyというのは基本的に画面全体を示す。
以下のコードが、背景画像の設定なのだ。
body{
background-image:url(“画像の名前”);
}
マロン先生
次は、アニメーションについてなのだ。
今回はマウスをかざすと、色が変わる
アニメーションをやるのだ。
ブラック君
背景画像はあれで終わりか。
いよいよアニメーションだ、楽しみだな。
でも、難しそう。
マロン先生
H1タグにそのアニメーションを付けるのだ。
以下のコードで、完了なのだ
h1:hover{
color:blue;
}
マロン先生
実行して、h1の部分にマウスをかざすと
以下のようになっただろう。
マロン先生
タグの後ろに:hoverと付けると、マウスを
かざした時のアニメーションができるのだ。
マロン先生
次は、マウスをかざすと、透明になる
アニメーションをやるのだ。
これはよくつかわれるので覚えておくのだ。
ブラック君
あれがあると、マウスをかざしてるって感じ
がしますよね。
よーし、やるぞ。
マロン先生
早速以下のコードを書いてくれ。
0.5は透過度を示しているのだ。
Img:hover{
opacity: 0.5;
}
マロン先生
実行してかざすと、以下のようになる。
薄くなったのがわかるだろ。
マロン先生
早速以下のコードを書いてくれ。
これで、0.5秒かけてアニメーションするのだ。
img:hover{
opacity: 0.5;
}
img{
-webkit-transition: 0.5s ease-in-out;
}
マロン先生
以上で今回の授業は終わりなのだ。
アニメーションはやっていくうちに複雑に
なるから、基礎は重要なのだ。
ブラック君
意外とあっさり終わりましたね。
でもアニメーションが簡単で良かったです。
ありがとうございました。

More Related Content

Viewers also liked

Infarto
InfartoInfarto
Infarto
xandecarud
 
Day Cap Dien Evertop ( Taiwan)
Day Cap Dien Evertop ( Taiwan)Day Cap Dien Evertop ( Taiwan)
Day Cap Dien Evertop ( Taiwan)
KB ELECTRIC
 
Gastrocon 2016 - GI Cancer
Gastrocon 2016 - GI CancerGastrocon 2016 - GI Cancer
Gastrocon 2016 - GI Cancer
ApolloGleaneagls
 
Nikos drakatos the _story
Nikos drakatos the _storyNikos drakatos the _story
Nikos drakatos the _story
Nikos Drakatos
 
Resume For Phillip Eric Montgomery
Resume For Phillip Eric MontgomeryResume For Phillip Eric Montgomery
Resume For Phillip Eric Montgomery
Eric Montgomer
 
Gastrocon 2016 - Dr G.N Ramesh describes how to diagnose NETs
Gastrocon 2016 - Dr G.N Ramesh describes how to diagnose NETsGastrocon 2016 - Dr G.N Ramesh describes how to diagnose NETs
Gastrocon 2016 - Dr G.N Ramesh describes how to diagnose NETs
ApolloGleaneagls
 
Wallander - Becka
Wallander - BeckaWallander - Becka
Wallander - Becka
Beckaa_Louisee
 
2015 ed psy 510 #11
2015 ed psy 510 #112015 ed psy 510 #11
2015 ed psy 510 #11
Glenn E. Malone, EdD
 
Blossom With Stress Management Dr Shriniwas Kashalikar
Blossom With Stress Management  Dr Shriniwas KashalikarBlossom With Stress Management  Dr Shriniwas Kashalikar
Blossom With Stress Management Dr Shriniwas Kashalikar
sakurikar
 
Workstation heat and power usage: Lenovo ThinkStation P500 vs. HP Z440 Workst...
Workstation heat and power usage: Lenovo ThinkStation P500 vs. HP Z440 Workst...Workstation heat and power usage: Lenovo ThinkStation P500 vs. HP Z440 Workst...
Workstation heat and power usage: Lenovo ThinkStation P500 vs. HP Z440 Workst...
Principled Technologies
 
2015 ed psy 510 #2
2015 ed psy 510 #22015 ed psy 510 #2
2015 ed psy 510 #2
Glenn E. Malone, EdD
 
Applause Award
Applause AwardApplause Award
PENSÃO ALIMENTÍCIA - PARTE 2
PENSÃO ALIMENTÍCIA - PARTE 2PENSÃO ALIMENTÍCIA - PARTE 2
PENSÃO ALIMENTÍCIA - PARTE 2
Anna Luiza Ferreira
 
Formulario para veredicto apple vs samsung
Formulario para veredicto apple vs samsungFormulario para veredicto apple vs samsung
Formulario para veredicto apple vs samsung
Mariano Amartino
 
Transição planetária
Transição planetáriaTransição planetária
Transição planetária
Erik Gabriel Thomazi
 
Revision of treatment protocols for hcv genotype 4 infection 2016
Revision of treatment protocols for hcv genotype 4 infection 2016Revision of treatment protocols for hcv genotype 4 infection 2016
Revision of treatment protocols for hcv genotype 4 infection 2016
Monkez M Yousif
 
Barretts Brief Version For Upload
Barretts Brief Version For UploadBarretts Brief Version For Upload
Barretts Brief Version For Upload
Shivakumar Vignesh
 
Dissertation presentation - Mcl-Scl PHA blend films for Cardiovascular Tissue...
Dissertation presentation - Mcl-Scl PHA blend films for Cardiovascular Tissue...Dissertation presentation - Mcl-Scl PHA blend films for Cardiovascular Tissue...
Dissertation presentation - Mcl-Scl PHA blend films for Cardiovascular Tissue...
ANUBHAV SARKAR
 
Asian paint final ppt
Asian paint final pptAsian paint final ppt
Asian paint final ppt
Nikhil Hulwan
 

Viewers also liked (20)

Infarto
InfartoInfarto
Infarto
 
Day Cap Dien Evertop ( Taiwan)
Day Cap Dien Evertop ( Taiwan)Day Cap Dien Evertop ( Taiwan)
Day Cap Dien Evertop ( Taiwan)
 
Gastrocon 2016 - GI Cancer
Gastrocon 2016 - GI CancerGastrocon 2016 - GI Cancer
Gastrocon 2016 - GI Cancer
 
Nikos drakatos the _story
Nikos drakatos the _storyNikos drakatos the _story
Nikos drakatos the _story
 
Resume For Phillip Eric Montgomery
Resume For Phillip Eric MontgomeryResume For Phillip Eric Montgomery
Resume For Phillip Eric Montgomery
 
Gastrocon 2016 - Dr G.N Ramesh describes how to diagnose NETs
Gastrocon 2016 - Dr G.N Ramesh describes how to diagnose NETsGastrocon 2016 - Dr G.N Ramesh describes how to diagnose NETs
Gastrocon 2016 - Dr G.N Ramesh describes how to diagnose NETs
 
Wallander - Becka
Wallander - BeckaWallander - Becka
Wallander - Becka
 
2015 ed psy 510 #11
2015 ed psy 510 #112015 ed psy 510 #11
2015 ed psy 510 #11
 
CSO_Brochure_7
CSO_Brochure_7CSO_Brochure_7
CSO_Brochure_7
 
Blossom With Stress Management Dr Shriniwas Kashalikar
Blossom With Stress Management  Dr Shriniwas KashalikarBlossom With Stress Management  Dr Shriniwas Kashalikar
Blossom With Stress Management Dr Shriniwas Kashalikar
 
Workstation heat and power usage: Lenovo ThinkStation P500 vs. HP Z440 Workst...
Workstation heat and power usage: Lenovo ThinkStation P500 vs. HP Z440 Workst...Workstation heat and power usage: Lenovo ThinkStation P500 vs. HP Z440 Workst...
Workstation heat and power usage: Lenovo ThinkStation P500 vs. HP Z440 Workst...
 
2015 ed psy 510 #2
2015 ed psy 510 #22015 ed psy 510 #2
2015 ed psy 510 #2
 
Applause Award
Applause AwardApplause Award
Applause Award
 
PENSÃO ALIMENTÍCIA - PARTE 2
PENSÃO ALIMENTÍCIA - PARTE 2PENSÃO ALIMENTÍCIA - PARTE 2
PENSÃO ALIMENTÍCIA - PARTE 2
 
Formulario para veredicto apple vs samsung
Formulario para veredicto apple vs samsungFormulario para veredicto apple vs samsung
Formulario para veredicto apple vs samsung
 
Transição planetária
Transição planetáriaTransição planetária
Transição planetária
 
Revision of treatment protocols for hcv genotype 4 infection 2016
Revision of treatment protocols for hcv genotype 4 infection 2016Revision of treatment protocols for hcv genotype 4 infection 2016
Revision of treatment protocols for hcv genotype 4 infection 2016
 
Barretts Brief Version For Upload
Barretts Brief Version For UploadBarretts Brief Version For Upload
Barretts Brief Version For Upload
 
Dissertation presentation - Mcl-Scl PHA blend films for Cardiovascular Tissue...
Dissertation presentation - Mcl-Scl PHA blend films for Cardiovascular Tissue...Dissertation presentation - Mcl-Scl PHA blend films for Cardiovascular Tissue...
Dissertation presentation - Mcl-Scl PHA blend films for Cardiovascular Tissue...
 
Asian paint final ppt
Asian paint final pptAsian paint final ppt
Asian paint final ppt
 

スライド5