csc309 winter 2016 lecture 2 - university of torontoylzhang/csc309w16/files/lec02-css.pdf ·...

82
CSC309 Winter 2016 Lecture 2 Larry Zhang 1

Upload: buingoc

Post on 18-Mar-2018

223 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

CSC309 Winter 2016

Lecture 2Larry Zhang

1

Page 2: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

Announcements

➔ Assignment 1 is out, due Jan 25, 10pm. Start Early!➔ Work in groups of 2, make groups on MarkUs.➔ Make sure you can login to MarkUs, if not let me know.

➔ Tutorial 1 this Wednesday, very important!➔ You will setup your personal web space on cs.utm servers.➔ You will exercise with HTML and CSS, which is what A1 is about.➔ Consider go to the 6-7pm section, fewer people, more help.➔ If you are from StG, email me your UTORID so I can create account for you

on cs.utm servers.2

Page 3: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

Cascading Style Sheets

3

Page 4: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

Why CSS?

➔ For each element that we have in the HTML file, we want to define some style for it.◆ size◆ color◆ position◆ margin◆ alignment◆ etc....

4

Page 5: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

The primitive way of styling

What’s bad about this?5

Page 6: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

Why CSS

We would like to decouple the code that describes

➔ What information is displayed➔ How the information is displayed

HTML file

CSS file

➔ Because of the separation, one CSS file can control the style of multiple HTML files.

➔ Decoupling is an important idea in software engineering!6

Page 7: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

Using a stylesheet file, e.g., “style.css”

<head>…<link href=”style.css” type=”text/css” rel=”stylesheet” />…</head>

One HTML file can include multiple stylesheets.

What if have conflicts? Good question. Will talk about it later.

7

Page 8: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

Can also embed into HTML file

Avoid using in general. Only for quick-and-dirty tests.

8

Page 9: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

demohttp://www.csszengarden.com/

9

Page 10: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

Basic CSS Rule Syntax

selector {

property: value;

property: value;

...

property: value;

}

The HTML elements selected by the selector have style define by all the property-value pairs.

10

Page 11: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

Selectors

11

Page 12: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

Select all elements of a kind

p {

font-size:100px;

color:red;

font-weight:bold;

} All <p> elements in HTML have font size 100px, red color and are boldface.

12

Page 13: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

You can group different selectors (use comma)

p, h1 {

color:red;

}

All <p> and <h1> elements in HTML have red colour.

13

Page 14: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

Select A inside B (use space)

<p>The red paragraph</p>

<div>

<p>I want to be blue!</p>

</div>

div p {

color:blue;

}

All <p> inside <div> have blue colour.

14

Page 15: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

Care about immediate parent (use “>”)

<div>

<span><p>I won’t turn blue!</p></span>

</div>

<div>

<p>I am blue.</p>

</div>

div > p {

color:blue;

}

select <p> whose immediate parent is a <div>

15

Page 16: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

Select according attribute (use [attr])

a[target] {

color:blue;

}

<a target=”_blank” href=”x.html”>I’m blue.</a>

<a href=”x.html”>I don’t turn blue</a>

select <a> who has “target” attribute

16

Page 17: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

Select elements under some “special state”

a:hover {

color:blue;

}

<a> turns blue when hovered over by mouse.

17

Page 18: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

Pseudo classes

18

Page 19: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

How to select this?

<p>A normal paragraph</p>

<p>I want to be different!</p>

Hard to find a selector that distinguishes these two.

The ugly way

<p>A normal paragraph</p>

<p style=”color:blue;”>I want to be different!</p>19

Page 20: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

The better way: use id or class attributes

<p>A normal paragraph</p>

<p id=”different”>I want to be different!</p>

#different {

color:blue;

}

Select the element with id “different”

20

Page 21: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

Use class

<p>A normal paragraph</p>

<p class=”different”>I want to be different!</p>

.different {

color:blue;

}

Select the element with class “different”21

Page 22: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

id vs class

➔ id must be unique, i.e., one id can only be used once by a single element.

➔ one class name can be used by multiple elements

22

Page 23: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

* {

color:blue;

}

p * {

color:blue;

}

23

Page 24: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

Full list of CSS selectors

➔ http://www.w3schools.com/cssref/css_selectors.asp

CSS selector (fun) exercises

➔ http://flukeout.github.io/

24

Page 25: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

Takeaway: what are the pros of using selectors compared to

➔ one selector can select multiple elements, so don’t need write the same style multiple times.

➔ one element can be of multiple class and combine multiple styles

➔ In general, it is better organized and more flexible

➔ Javascript works well with selectors, too.

25

Page 26: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

Cascading Style Sheets

What is cascading about?

26

Page 27: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

Cascading

➔ More than one stylesheet rules could be applied to an HTML element

➔ We need a way to determine which rule actually has effect.

➔ The general rule is to cascade down from more general rules to more specific rules, i.e., the more specific rule is chosen.

27

Page 28: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

Example

<div>

<p>What’s my colour?</p>

</div>p {

color:red;

}

div p {

color:blue;

}This rule is more specific, so the colour is blue.

28

Page 29: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

Cascading: more details➔ Later rules override earlier rules (with everything else being equal)

➔ Closer rules override farther rules

◆ inline rules override…

◆ rules embedded in the head, which overrides

◆ rules defined in external stylesheet

➔ more specific rules override more general rules

➔ an element inherits the style of its container

➔ The exact calculation: http://www.blooberry.com/indexdot/css/topics/cascade.htm

➔ Your code should be so simple and clear that no complicated calculation is need to determine which one overrides.

29

Page 30: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

selector {

property: value;

property: value;

...

property: value;

}

We’re done talking about selectors

Let’s talk about properties and values.

30

Page 31: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

the style properties that you can set

31

Page 32: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

colours

32

Page 33: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

Specifying colours

33

Page 34: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

Fonts

Full list of font properties: http://www.w3schools.com/css/css_font.asp

34

Page 35: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

Font family

35

Page 36: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

Font family

36

Page 37: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

Font size

37

Page 38: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

Font sizeUsing em is recommended by W3C

38

Page 39: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

font-weight, font-style

39

Page 40: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

CSS properties for text

Full list of text properties: http://www.w3schools.com/css/css_text.asp

40

Page 41: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

text-align

41

Page 42: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

text-decoration

42

Page 43: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

CSS properties for background

43

Page 44: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

background-image

44

Page 45: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

background-repeat

45

Page 46: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

background-position

46

Page 47: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

Just look it up here when neededhttp://www.w3schools.com/css/default.asp

47

Page 48: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

Page Layout with CSS

48

Page 49: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

The CSS Box Model

49

Page 50: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

The CSS Box Model: more details

50

Page 51: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

Related properties of the box model

border: 5px solid red;

margin //for all 4 sides

margin-left

margin-right

margin-top

margin-bottom

padding //for all 4 sides

padding-left

padding-right

padding-top

padding-bottom

width, height: note this is only for the content part, the real width/height of the whole box is more than the defined value (+padding+border+margin)

51

Page 52: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

More about width

width changes with browser size

limit the range of change

52

Page 53: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

Float

53

Page 54: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

The normal document flow

block elements

inline elements

54

Page 55: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

The normal document flow: with both

55

Page 56: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

Float

56

Page 57: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

document flow with float

57

Page 58: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

clear

disallows the floating element to overlap with the element that “clears”

58

Page 59: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

document flow with clear

59

Page 60: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

common bug: float with no width

60

Page 61: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

common bug: container too short

61

Page 62: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

fix it: using overflow: hidden (or auto)

62

Page 63: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

Multi-column layout

63

Page 64: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

Position

64

Page 65: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

The position property

65

Page 66: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

MUST READ & TRY

great tutorial with positioning examples

http://www.barelyfitz.com/screencast/html-training/css/positioning/

66

Page 67: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

display and visibility

67

Page 68: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

display

68

Page 69: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

visibility

69

Page 70: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

display:none; vs visibility:hidden;

➔ display:none; makes an element take NO space➔ visibility:hidden; still takes the space but just you can’t see it

div1

div3

div3

div1

70

Page 71: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

Takeaway: box model, doc flow...

Before you learn these things, you may have had your CSS kind-of working by try-change-it-and-see-what-happens (change margin or padding? don’t care), that typically leads to broken ugly layouts, without you realizing it.

Now you learned these things, you should do everything in the principled way.

71

Page 72: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

CSS3

the latest standard of CSS

72

Page 73: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

CSS3

➔ CSS3 is completely backward-compatible with old version of CSS, and added a bunch of new features, such as

◆ round corners

◆ gradients

◆ shadows

◆ animation

◆ media queries

73

Page 74: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

Rounded corner

We used to have to do this:

-moz-border-radius: 10px 5px;

-webkit-border-top-left-radius: 10px;

-webkit-border-top-right-radius: 5px;

-webkit-border-bottom-right-radius: 10px;

-webkit-border-bottom-left-radius: 5px;

border-radius: 10px 5px;

Now we do this

border-radius: 10px 5px;

74

Page 75: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

Media Query

Useful for responsive design, i.e., change the page style dynamically according to the screen size.

For example:

demo link: http://www.w3schools.com/css/css3_mediaqueries.asp75

Page 76: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

CSS3 Animation

No need of Javascript.

Demo

https://daneden.github.io/animate.css/

76

Page 77: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

77

Page 78: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

Assignment 1

➔ One HTML, two stylesheets

78

Page 79: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

Assignment 1

➔ make sure to satisfy all the requirement➔ try to make it good-looking➔ can add additional features, without violating any requirements➔ Ask me whenever there is something unclear.

➔ For source code management, the department can only do SVN right now, which is not good

➔ So, recommendation: use Bitbucket (http://bitbucket.org) to create a shared GIT or Mercurial repository with your partner.

➔ Make you project PRIVATE!79

Page 80: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

The minimalist GIT tutorial

80

GIT SVN

git clone <repo URL> svn checkout <repo URL>

git pull origin master svn update

git add <filename> svn add <filename>

git commit -am “<log text>”

git push origin mastersvn commit -m “<log text>”

git status svn status

The GIT book: https://git-scm.com/book/en/v2Why you should use git:https://www.youtube.com/watch?v=4XpnKHJAok8

Page 81: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

Google Font

Easy way to get fancy fonts.

https://www.google.com/fonts

You can use it for Assignment 1.

81

Page 82: CSC309 Winter 2016 Lecture 2 - University of Torontoylzhang/csc309w16/files/lec02-css.pdf · font-size:100px; color:red; font-weight: ... The general rule is to cascade down from

Today we learned

➔ CSS

Next week:

➔ Javascript

82