CSS Flashcards

1
Q

Three types of selectors

A
Element: select all of these elements
.class: all elements with class
#id: specific, is only used once on a page
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Descendant combinator

A

“ul li {
color: green;
}”
Selects all li’s in the ul

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Child combinator

A

“ul > li {
color: green;
}”
Selects direct descendants only.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Adjacent combinator

A
"
h1 + p {
}
"
Targets all the p's immediately following h1's
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

pseudo-classes

A

usually based on state of elements
:hover: an element that has the mouse over it
:visited: a link that has been clicked
:first-child: the first element to appear inside of another
:nth-child: applies to every nth-child of a given parent.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

group selectors

A

p, h2 {
color: red;
}`

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

CSS Box Model

A

Represents the space an element takes up on a page, and how it relates to other elements.
Content

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Transition: shorthand

A

transition: property duration timing-function delay

How well did you know this?
1
Not at all
2
3
4
5
Perfectly