Introduction to HTML/CSS (part 5)

Слайд 2

HTML HyperText Markup Language

HTML
HyperText Markup
Language

Слайд 3

Responsive Web Design

Responsive
Web Design

Слайд 4

Responsive design

Responsive design

Слайд 5

Responsive design

Responsive design

Слайд 6

Mobile first Unobtrusive JavaScript Concepts Progressive enhancement Responsive design

Mobile first

Unobtrusive JavaScript

Concepts

Progressive enhancement

Responsive design

Слайд 7

Media Queries

Media Queries


media="screen" href="example.css" />


Слайд 8

Media Queries /* CSS media query within a stylesheet */ @media

Media Queries


media="screen" href="example.css" />


/* CSS media query within a stylesheet */
@media all and (min-width:500px) { … }
@media (orientation: portrait) { … }
@media not (all and (monochrome)) { ... }
Слайд 9

Media Features

Media Features

Слайд 10

Device specific breakpoints /* Smartphones (portrait and landscape) */ @media only

Device specific breakpoints

/* Smartphones (portrait and landscape) */
@media only screen and

(min-device-width : 320px) and (max-device-width : 480px) {
/* Styles */
}
/* Samsung Galaxy S5 */
@media only screen and (min-device-width: 360px) and (max-device-height: 640px) and (orientation : landscape) and (-webkit-device-pixel-ratio: 3){
/* Styles */
}
@media only screen and (min-device-width: 360px) and (max-device-height: 640px) and (orientation : portrait) and (-webkit-device-pixel-ratio: 3){
/* Styles */
}
/* iPhone 6 */
@media only screen and (min-device-width: 375px) and (max-device-height: 667px) and (orientation : landscape) and (-webkit-device-pixel-ratio: 2){
/* Styles */
}
@media only screen and (min-device-width: 375px) and (max-device-height: 667px) and (orientation : portrait) and (-webkit-device-pixel-ratio: 2){
/* Styles */
}
Слайд 11

Device specific breakpoints /* iPads (portrait and landscape) */ @media only

Device specific breakpoints

/* iPads (portrait and landscape) */
@media only screen and

(min-device-width : 768px) and (max-device-width : 1024px) {
/* Styles */
}
/* iPads (landscape) */
@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : landscape) {
/* Styles */
}
/* iPads (portrait) */
@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : portrait) {
/* Styles */
}
/* Desktops and laptops */
@media only screen and (min-width : 1024px) {
/* Styles */
}
/* Large screens */
@media only screen and (min-width : 1824px) {
/* Styles */
}