CodePreneur Week2 -Introduction to css3

40
Hi again

Transcript of CodePreneur Week2 -Introduction to css3

Page 1: CodePreneur Week2 -Introduction to css3

Hi again

Page 2: CodePreneur Week2 -Introduction to css3

This is Codepreneur2016

Page 3: CodePreneur Week2 -Introduction to css3

BANJO MOFESOLA PAULCHIEF DEVELOPER,PLANET NEST

good to see you again

[email protected]

Page 4: CodePreneur Week2 -Introduction to css3

Last week, we went through HTML5, remember?

Page 5: CodePreneur Week2 -Introduction to css3

Exercisecreate an HTML page

Page 6: CodePreneur Week2 -Introduction to css3

Week 2.CSS & Other Pretty Things

Page 7: CodePreneur Week2 -Introduction to css3

CSS – THE SECRETSee all those wonderful faces? Appreciate the power of makeup!

Page 8: CodePreneur Week2 -Introduction to css3

SYMBIOSISHTML describes the content, CSS describes the layout

Page 9: CodePreneur Week2 -Introduction to css3

CSS – A whole new world

Page 10: CodePreneur Week2 -Introduction to css3

OUR NEW FRIENDS<style> tag, {curly braces} and semicolons;

Page 11: CodePreneur Week2 -Introduction to css3

THE TRICKSelectors define ‘where’, rules describe ‘what’ – selectors contain rules (attributes)

Page 12: CodePreneur Week2 -Introduction to css3

BRACESThey enclose style rules particular to each selector

Page 13: CodePreneur Week2 -Introduction to css3

RULESaka attributes; they link up with their values with a colon ( : )

Page 14: CodePreneur Week2 -Introduction to css3

Colors.paint bucket and acrylic

Page 15: CodePreneur Week2 -Introduction to css3

TWO WAYSName them or code them

Page 16: CodePreneur Week2 -Introduction to css3

HEADS UP!While naming them is cool, it’s problematic

Page 17: CodePreneur Week2 -Introduction to css3

SO WE CODE THEMIntroducing hex codes color representation – the world is RED, GREEN, BLUE [, AND ALPHA]

Page 18: CodePreneur Week2 -Introduction to css3

Hex color valuesSome weird geeky stuff

Page 19: CodePreneur Week2 -Introduction to css3

DOT COLORATIONThe computer’s screen is just many colored light bulbs – think of stage lights

Page 20: CodePreneur Week2 -Introduction to css3

THE RANGE0 is off, 255 is fully on

Page 21: CodePreneur Week2 -Introduction to css3

THE DIFFERENCEEach color component’s brightness determines the resulting visible color

Page 22: CodePreneur Week2 -Introduction to css3

A LITTLE BIT OF MATHBinary and Hexadecimals

Page 23: CodePreneur Week2 -Introduction to css3

Decimal Binary Hexadecimal

0 0000 0

1 0001 1

2 0010 2

3 0011 3

4 0100 4

5 0101 5

6 0110 6

… … …

Decimal Binary Hexadecimal

… … …

10 1010 A

11 1011 B

12 1100 C

13 1101 D

14 1110 E

15 1111 F

… … …

Page 24: CodePreneur Week2 -Introduction to css3

HEX COLORA color requires six hex digits, and a pound (hash) sign

Page 25: CodePreneur Week2 -Introduction to css3

WHY USE THEM?Precision, Objectivity, Portability, Predictability, Ease of use

Page 26: CodePreneur Week2 -Introduction to css3

Exerciseplay with hexes a bit

Page 27: CodePreneur Week2 -Introduction to css3

Text.face, size, and others

Page 28: CodePreneur Week2 -Introduction to css3

PLAYING SAFE WITH FONTSThere are maybe tens of millions of fonts worldwide, not everyone has them all

Page 29: CodePreneur Week2 -Introduction to css3

GENERIC FONTSSerif, sans-serif, cursive, fantasy, monospace

Page 30: CodePreneur Week2 -Introduction to css3

SELECTOR TYPESELEMENT, .CLASS, #ID – they all define ‘what’, but are somewhat different

Page 31: CodePreneur Week2 -Introduction to css3

ExerciseMake a greeting card

Page 32: CodePreneur Week2 -Introduction to css3

QUICK ONEHTML special chars begin with ampersand ( & ) and end with semicolon ( ; )

Page 33: CodePreneur Week2 -Introduction to css3

QUICK ONE<div>s & <span>s : block-level and inline.

Page 34: CodePreneur Week2 -Introduction to css3

Pseudo-classesCase study – links

Page 35: CodePreneur Week2 -Introduction to css3

More CSS jargonsibling, child, attribute, nth,

and more pseudo

Page 36: CodePreneur Week2 -Introduction to css3

The box model

Page 37: CodePreneur Week2 -Introduction to css3

Content

bordermargin

padd

ing

Page 38: CodePreneur Week2 -Introduction to css3

Levels of CSSinline, document, external

Page 39: CodePreneur Week2 -Introduction to css3

To the Laband we’ll stay there

Page 40: CodePreneur Week2 -Introduction to css3

O dabo!