CSS Flashcards
What are the four components of “the Cascade”.
inheritance, specificity, !important, source order
What does the term “source order” mean with respect to CSS?
In CSS the last style rule set for a selector takes effect
How is it possible for the styles of an element to be applied to its children as well without an additional CSS rule?
inheritance
List the three selector types in order of increasing specificity.
class column, type column, no value ( ),
Why is using !important considered bad practice?
it overrides everything
The transition property is shorthand for which four CSS properties?
transition - property, duration, timing-function, delay
What does the transform property do?
lets you rotate, scale, skew, or translate an element.
Give four examples of CSS transform functions.
Rotate, translate, scale, and skew
What are the names of the individual pieces of a CSS rule?
selector, declaration, property, value
In CSS, how do you select elements by their class attribute?
.then name of class attribute
In CSS, how do you select elements by their tag name?
just the name of the element
In CSS, how do you select an element by it’s id attribute?
- # then name of id attribute
Name three different types of values you can use to specify colors in CSS.
rgb, hex, hsl
What CSS properties make up the box model?
border, margin, padding, height and width
What CSS property pushes boxes away from each other?
margin