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
2
Q
Descendant combinator
A
“ul li {
color: green;
}”
Selects all li’s in the ul
3
Q
Child combinator
A
“ul > li {
color: green;
}”
Selects direct descendants only.
4
Q
Adjacent combinator
A
" h1 + p { } " Targets all the p's immediately following h1's
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.
6
Q
group selectors
A
p, h2 {
color: red;
}`
7
Q
CSS Box Model
A
Represents the space an element takes up on a page, and how it relates to other elements.
Content
8
Q
Transition: shorthand
A
transition: property duration timing-function delay