Css 2.0

31
Shashidhar HB

description

 

Transcript of Css 2.0

Page 1: Css 2.0

Shashidhar HB

Page 2: Css 2.0

Captivating Design

Page 3: Css 2.0

CSS

Page 4: Css 2.0

So how do we do it?

Page 5: Css 2.0

CSS is a design language for the web

Page 6: Css 2.0

h1 { color : blue ; margin : 1px; }

Page 7: Css 2.0

h1 { color : blue ; margin : 1px; }

SELECTOR

DECLARATION

PROPERTY VALUE

Page 8: Css 2.0

#i1 { color : blue ; margin : 1px; }

<div id=“i1”>…</div>

Page 9: Css 2.0

.c1 { color : blue ; margin : 1px; }

<div class=“c1”>…</div> <p class=“c1”>…</p>

Page 10: Css 2.0

a:hover { color : blue ; }

<a href=“somelink”>…</a>

Page 12: Css 2.0

3 types of style sheets can

be applied to HTML document

Page 13: Css 2.0

• Browser style sheet

• User style sheet

• Author style sheets

• Author style sheet

Page 14: Css 2.0

3 ways to

embed author style sheets to

HTML

Page 15: Css 2.0

Inline Style

<body> <h1 style=“color: blue;”> <p> . . . .

Page 16: Css 2.0

Header Style

<head> <title>CSS Tutorial</title> <style type="text/css" media="screen"> h1 { color: blue; margin: 1px; } </style> . .

Page 17: Css 2.0

External Style

<title>CSS Tutorial</title> <link rel="stylesheet" href="css/reset.css" type="text/css" media="all"> . . . .

Page 18: Css 2.0

http://www.w3schools.com/css/

For try outs

Page 19: Css 2.0

REST or Normalize CSS

Page 20: Css 2.0

• Browser style sheet

• User style sheet

• Author style sheets

• Author style sheet

Page 21: Css 2.0

Browser Style Sheet /* Default Style Sheet Will be applied to all HTML pages */ h2 { color: orange; font-family: fantasy; position: relative; top: 10%; left: 30%; }

User Style Sheet /* User customizations which can be configured in the browser.. */ h2 { color: red; font-family: fantasy; position: relative; top: 20%; left: 40%; }

Author Style Sheet /* Coded by the Web Page Author */ h2 { Inline Style color: blue; Header Style font-family: fantasy; External Style position: relative; top: 30%; left: 50%; }

Page 22: Css 2.0
Page 23: Css 2.0
Page 24: Css 2.0

Web Development Tools

Page 25: Css 2.0

ctrl + shift + i

Page 26: Css 2.0

Chrome Developer Tools

Page 27: Css 2.0

DEMO

Page 30: Css 2.0
Page 31: Css 2.0