introduction to responsive web design

32
22-3376 Web Design 2 // Columbia College Chicago RESPONSIVE / BOOTSTRAP

Upload: shawn-calvert

Post on 02-Dec-2014

250 views

Category:

Documents


4 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Introduction to Responsive Web Design

22-3376 Web Design 2 // Columbia College Chicago

RESPONSIVE / BOOTSTRAP

Page 2: Introduction to Responsive Web Design

What is Responsive Web Design?

Page 3: Introduction to Responsive Web Design

Responsive web design (RWD) is a web development approach that creates dynamic changes to the appearance of a website, depending on the screen size and orientation of the device being used to view it

Page 4: Introduction to Responsive Web Design
Page 5: Introduction to Responsive Web Design

mediaqueri.es

Page 6: Introduction to Responsive Web Design

<head>! <link rel="stylesheet" type="text/css" href="stylesheet.css">! <link rel="stylesheet" type="text/css" href="print.css" media="print">!</head>

The media attribute specifies what media/device the target resource is optimized for. The most common usage is for overriding styles for printing.

Media Types

Page 7: Introduction to Responsive Web Design

@media print {! p {font-size: 20px;! color: red;! }!}

The @media rule allows different style rules for different media in the same style sheet.

Media Types

Page 8: Introduction to Responsive Web Design
Page 9: Introduction to Responsive Web Design

Media Queries is a CSS3 module allowing content rendering to adapt to conditions such as screen resolution (e.g. smartphone screen vs. computer screen). !

A media query consists of a media type and one or more expressions, involving media features, which resolve to either true or false.

Media Queries

http://www.w3.org/TR/css3-mediaqueries/

Page 10: Introduction to Responsive Web Design

Media Queries

@media print {! p {font-size: 20px;! color: red;! }!}

Page 11: Introduction to Responsive Web Design

<meta name=“viewport” content=“width=device-width, initial-scale=1.0>

Many small devices will automatically scale up or down your website to around 960px. This header tag tells the browser to scale the content to the actual window size of the device.

Viewport

Page 12: Introduction to Responsive Web Design

Breakpoints

Page 13: Introduction to Responsive Web Design

A simple version from the framework ‘Base’:

@media only screen and (min-width: 740px) and (max-width: 959px) { }

@media only screen and (max-width: 739px) { }

Breakpoints

http://matthewhartman.github.io/base/

Page 14: Introduction to Responsive Web Design

@media only screen and (min-width: 740px) and (max-width: 959px) { !

When viewed on a screen

AND

Minimum width of screen is at least 740px but not more than 959px

!

Breakpoints

Page 15: Introduction to Responsive Web Design

Breakpoints

@media only screen and (min-width: 740px) and (max-width: 959px) {}

@media only screen and (max-width: 739px) {}

(default)

Page 16: Introduction to Responsive Web Design

Tutorial !

1 Responsive Test

Page 17: Introduction to Responsive Web Design

What is Mobile First?

Page 18: Introduction to Responsive Web Design

What is Mobile First? !

It Mobile up,not Desktop down.

Page 19: Introduction to Responsive Web Design
Page 20: Introduction to Responsive Web Design
Page 21: Introduction to Responsive Web Design

Mobile-first approach from Bootstrap 3.0:

@media (min-width: 768px) { } @media (min-width: 992px) { } @media (min-width: 1200px) { } !

Breakpoints (Mobile-First)

http://getbootstrap.com/

Page 22: Introduction to Responsive Web Design

Breakpoints: Mobile First (Bootstrap)

@media (min-width: 768px) @media (min-width: 998px) @media (min-width: 1200px)(default)

Page 23: Introduction to Responsive Web Design
Page 24: Introduction to Responsive Web Design
Page 25: Introduction to Responsive Web Design
Page 26: Introduction to Responsive Web Design
Page 27: Introduction to Responsive Web Design

Tutorial !

2 Bootstrap Simple

Page 28: Introduction to Responsive Web Design
Page 29: Introduction to Responsive Web Design
Page 30: Introduction to Responsive Web Design
Page 31: Introduction to Responsive Web Design
Page 32: Introduction to Responsive Web Design

Tutorial !

3 Bootstrap Nav