css3 fundamentals Flashcards
Scale an item
transform: scale( val ); // or (xScale, yScale)
Skew an item
transform: skew(val); // or skewX or Y
How can you transform an element with perspective and rotation?
transform: perspective(100px) rotateX(45deg); // p needs to come first.
transform-style: preserve-3d; Does what?
If it’s on a parent with 3D effects, the children can have their own 3D effects based on parent’s space.
How can you change the vanishing point in a 3D transform?
Use perspective-origin: x y || left bottom || 25% 75%
What is the property for having an element animate?
animation: name-of-animation 3s numIterations
What is the format for an animation’s keyframes?
@keyframes name-of-animation { 0% { prop: val; } }
For vanishing point to be in the very center, do what?
width and height of child should be 100% width and height of parent.
Hide an element when it’s flipped away from view in 3d space.
backface-visibility: hidden;
Create a flexbox container
display: flex
What property controls the direction a flexbox goes?
flex-direction: row, row-reverse, column, column-reverse
What if you don’t want flexbox to keep items on one line?
flex-wrap: wrap (nowrap or wrap-reverse)
How can you set sequence of items using flexbox?
order: ;
What is flex-flow property?
A combination or shorthand for flex-direction and flex-wrap. E.g. column nowrap or row wrap;
what is flex-basis?
It specifies the main-size of a flex item. Main size is size along “main” axis.
what is flex property and what are defaults?
Shorthand for flex-grow, flex-shrink, and flex-basis combined. Default is: 0 1 auto;
What are values for justify-content in flexbox?
flex-start, flex-end, center, space-between, space-around
what is flexbox align-self property?
Enables individual item to over-ride flexbox alignment.
How can you vertically align flexbox items?
align-items: flex-start, flex-end, center, baseline, stretch
What does flexbox align-content property do?
It aligns along the cross-axis when there is more than one row. Note difference with align-items.
Use what property and value to center items along main axis in flexbox?
justify-content: center;