IES: CSS-deck 17 Flashcards
1
Q
border-image-outset
A
- one of the optional additional properties of
border-image
- specifies how far the image can extend outside the border area
2
Q
transform
A
- CSS property that dynamically manipulates content boxes
- changes their size, position, or orientation
- specifies a transformation function:
1. scale(n1, n2) (can be specified to one value: applied to both x- and y-axes
2. scaleX(n)
3. scaleY(n)
4. skew(n1, n2)
5. skewX(n)
6. skewY(n)
7. rotate(n)
8. rotateX(n)
9. rotateY(n)
10. rotateZ(n)
11. translate(n1, n2)
12. translateX(n)
13. translateY(n)
14. matrix(n, n, n, n, n, n) - Transformations can be specified to an element’s
:hover
3
Q
transform-origin
A
- the point around which a transformation is performed
- (default): the center of the element
- An alternative can be specified by:
1. units
2. percentages - keywords:
- top
- bottom
- left
- right
- center
- Ex.
transform-origin
: top-right; (element pivots around its top-right corner)
- keywords:
-
transform-origin
can only be used in conjunction withtransform
4
Q
transition
:
A
- a CSS property
- can dynamically modify property values of color, size, position, orientation, etc. over a specified period of time
- creates simple animated effects
- must specify property to be modified, and effect duration
- multiple properties specified as a comma-separated list of property and duration pairs
5
Q
transition
duration:
A
-
transition
duration default 0s - a transition will not run unless you specify a duration
6
Q
transition-timing-function
:
A
- can control the “acceleration curve” of the effect
- controls by assigning one of the functions:
1. linear : consistent speed from start to end
2. ease : increases from start to reach full speed then decreases at end (default)
3. ease-in : increases at start only
4. ease-out : decreases at end only
5. ease-in-out : increases at start and decreases at end
6. steps(n) : jump to n number of intervals
7. cubic-bezier(x1, y1, x2, y2) : elastic or bounce between coordinates
7
Q
transition-delay
:
A
- specifies a time value
- So the effect will not begin immediately
8
Q
transition
shorthand:
A
- shorthand for individual properties:
1. transition-property
2. transition-duration
3. transition-timing-function
4. transition-delay - values for all four may be specified in this order
- Ex. transition: width 5s linear 0.5s;
9
Q
steps()
:
A
-
transition
? function - jumps to pauses in the transition
- so, steps(5): pauses each second in a 5 second effect
10
Q
transition
shorthand :hover
A
- the final shorthand value can be specified to an element’s
:hover
, so transformation will occur there with that event - element resumes original values with event end: automatically running transition effect in reverse
11
Q
animation
:
A
- (transitions and animations can combine to great effect)
- CSS property
- nominates “keyframes” to determine property values at particular points
- can specify (in this order):
1. animation name (defined by @keyframes rule)
2. duration (specified as with transitions)
3. timing function (controls acceleration curve, same as those for transitions-such as “ease-in-out”)
4. delay (specified as with transitions)
5. iteration count (may be an integer or the keyword “infinite”)
6. direction (can be specified as “normal” (default), “reverse”, or “alternate” (alternating between playing forward and reverse on successive iterations))
12
Q
@keyframes :
A
- an
animation
CSS rule - defines an
animation
name and selects points using percentages or from and to keywords - Ex. @keyframes bounce {
from {top: 100px;}
50% {top: 150px;}
to {top: 300px;}
} - Keyframes determine the styles one or more properties will have at various points during an animation
13
Q
animation
shorthand:
A
-
animation
is shorthand for individual properties:
1.animation-name
2.animation-duration
3.animation-timing-function
4.animation-delay
5.animation-iteration-count
6.animation-direction
- can specify in a space-separated list (in this order):
1. animation name
2. duration
3. timing function
4. delay
5. iteration count
6. direction - Ex. animation: bounce 5s linear 1s infinite alternate;
- (no animation delay required, so its value is omitted, and the browser uses its zero default delay value)
14
Q
uu
animation-fill-mode
:
A
- CSS
animation
property - for animations that run for a set number of iterations
- potential specified values:
1. “forwards”: retains the values of the final keyframe
2. “backwards”: will get the style values of the first keyframe
3. “both”: retains the final keyframe values and will get the first keyframe style values
15
Q
Centering image and videos:
A
- centering within a container
1. > make the element into a block
2. > set the left and right margins to “auto”