Cascading style sheets презентация

Содержание

Слайд 2

Create well-formatted HTML Tables Understand when and when not to

Create well-formatted HTML Tables Understand when and when not to use

tables Explain the role of the form element
Utilize a variety of form controls Define complex HTML forms Add HTML5 Form Validations Ensure accessibility of our forms

Unit Goals
Things We' ll Cover

Слайд 3

THE PURPLE CSS - adjectives DINO HTML - nouns DANCED JS - verbs

THE
PURPLE CSS - adjectives
DINO HTML - nouns
DANCED JS - verbs

Слайд 4

CSS WHAT DOES IT STAND FOR? CSS stands for Cascading

CSS

WHAT DOES IT STAND FOR?
CSS stands for Cascading Style Sheets. We'll cover the "cascading" part in

a bit; don't worry about it for now!

THERE'S A LOT!

CSS is very easy to get the hang of, but it can be intimidating because of how many properties we can manipulate.

WHAT IS IT?

CSS is a language for describing how documents are presented visually - how they are arranged and styled.

Слайд 5

What is CSS? Cascading Style Sheets (CSS): is a simple

What is CSS?

Cascading Style Sheets (CSS): is a simple mechanism for

adding style (e.g., fonts, colors, layouts) to Web documents.
Styles provide powerful control over the presentation of web pages.
Слайд 6

CASCADING STYLE SHEET

CASCADING STYLE SHEET

Слайд 7

CSS RULES (almost) everything you do in CSS follows this

CSS RULES
(almost) everything you do in CSS follows this basic pattern:

selector

{

property:

value;

}

Слайд 8

CSS RULES Make all elements purple h1 { color: purple; }

CSS RULES
Make all

elements purple

h1 {
color: purple;
}

Слайд 9

FANCIER! Select every other text input and give it a

FANCIER!
Select every other text input and give it a red border:

input[type="text"]:nth-of-type(2n){

border:2px solid red;
}
Слайд 10

Style Sheet Syntax Explained selector property value rule

Style Sheet Syntax Explained

selector

property

value

rule

Слайд 11

Local confined to a single element (tag) Internal affect elements

Local
confined to a single element (tag)
Internal
affect elements in an entire

page
External
can affect multiple pages
Precedence
Local > Internal or External

THREE DIFFERENT SCOPES OF CSS

Слайд 12

Local Style Sheet

Local Style Sheet

Слайд 13

Including Styles THE ELEMENT You can write your styles inside

Including
Styles

THE tag between and

tags of your HTML page
Use type attribute to indicate the style sheet type, usually type=“text/css”
Put your set of style sheet rules in between tags
Слайд 15

External Style Sheet An external style sheet is simply a

External Style Sheet

An external style sheet is simply a text-only file

with .css extension
It contains only CSS rules. No tags inside!
How to link to external style sheet?



Слайд 16

Internal Style Sheet Example body {background-color:beige;} p {color: purple;}

Internal Style Sheet

Example



Слайд 17

Tag redefines the look of a specific tag E.g. body

Tag
redefines the look of a specific tag
E.g. body {background-color: #000000;}
Class
can apply

to any tag
E.g. .indent{margin-right:5%;margin-left: 5%;}
In HTML,


Advanced
IDs, pseudo-class selectors
E.g. #myId {color: #38608A;}

Selector Type

Слайд 18


Слайд 19

CSS Colors

CSS
Colors

Слайд 20

NAMED COLORS

NAMED COLORS

Слайд 21

Mediumorchid Firebrick Darkkhaki MediumAquamarine Lightskyblue Tomato Gold Hotpink

Mediumorchid Firebrick

Darkkhaki

MediumAquamarine Lightskyblue
Tomato

Gold

Hotpink

Слайд 22

A typical computer can display ~16,000,000 different colors different colors

A typical computer can display ~16,000,000 different colors

different colors

Слайд 23

RGB Red, Green, Blue Channels Each channel ranges from 0-255

RGB

Red, Green, Blue Channels
Each channel
ranges from 0-255

Слайд 24

rgb(255,0,0) rgb(0,0,255) rgb(173, 20, 219) rgb(0,0,0)

rgb(255,0,0)
rgb(0,0,255)
rgb(173, 20, 219) rgb(0,0,0)

Слайд 25

Hex Still red, green, and blue channels Each ranges from 0-255 BUT represented with hexadecimal

Hex

Still red, green, and blue channels
Each ranges from
0-255 BUT
represented with hexadecimal

Слайд 26

Decimal 0, 1 , 2, 3, 4, 5, 6, 7, 8, 9

Decimal

0, 1 , 2, 3, 4,
5, 6, 7, 8, 9

Слайд 27

Hexadecimal 0, 1, 2, 3, 4, 5, 6, 7, 8,

Hexadecimal

0, 1, 2, 3, 4,
5, 6, 7, 8, 9,
A, B, C,

D, E, F
Слайд 28

#ffff00 red green blue

#ffff00
red green blue

Слайд 29

#0f5679 red green blue

#0f5679
red green blue

Слайд 30

CSS Text Properties text-align font-weight text-decoration line-height letter-spacing

CSS Text Properties

text-align
font-weight
text-decoration line-height
letter-spacing

Слайд 31

FONT SIZE

FONT

SIZE

Слайд 32

Absolute PX PT CM IN MM Relative EM REM VH VW - % AND MORE!

Absolute
PX
PT
CM
IN
MM

Relative
EM
REM
VH
VW
- %
AND MORE!

Слайд 33

FONT FAMILY

FONT FAMILY

Слайд 34

Absolute Units PX - BY FAR THE MOST COMMONLY USED

Absolute Units

PX - BY FAR THE MOST
COMMONLY USED ABSOLUTE UNIT
1px does not necessarily equal the width of exactly one pixel!
Not

recommended for responsive websites.
Слайд 35

em EM'S ARE RELATIVE UNITS With font-size, 1em equals the

em

EM'S ARE RELATIVE UNITS
With font-size, 1em equals the font-size of the

parent. 2em's is twice the font- size of the parent, etc.
With other properties, 1em is equal to the computed font-size of the element itself.
Слайд 36

rem ROOT EMS Relative to the root html element's font-size.

rem

ROOT EMS
Relative to the root html element's font-size. Often easier to work with.
If the

root font-size is 20px, 1 rem is always 20px, 2rem is always 40px, etc.
Имя файла: Cascading-style-sheets.pptx
Количество просмотров: 16
Количество скачиваний: 0