For the Muze Dev Day, I want to make a simple example for each CSS animation and transition.
Certain CSS properties can be animated using CSS Animations or CSS Transitions. Animation means that their values can be made to change gradually over a given amount of time.
Source: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_animated_properties
Besides all, these properties are:
accent-colorbackdrop-filterbackground
background-colorbackground-positionbackground-sizeblock-size
max-block-sizemin-block-sizeborder
border-bottomborder-leftborder-rightborder-topborder-color
border-bottom-colorborder-left-colorborder-right-colorborder-top-colorborder-width
border-bottom-widthborder-left-widthborder-right-widthborder-top-widthborder-radius
border-bottom-left-radiusborder-bottom-right-radiusborder-end-end-radiusborder-end-start-radiusborder-start-end-radiusborder-start-start-radiusborder-top-left-radiusborder-top-right-radiusborder-block-endborder-block-end-colorborder-block-end-widthborder-block-startborder-block-start-colorborder-block-start-widthborder-image-outsetborder-image-sliceborder-image-widthborder-inline-endborder-inline-end-colorborder-inline-end-widthborder-inline-startborder-inline-start-colorborder-inline-start-widthbottombox-shadowcaret-colorclipclip-pathcolorcolumn-countcolumn-gapcolumn-rulecolumn-rule-colorcolumn-rule-widthcolumn-widthcolumnsfilterflexflex-basisflex-growflex-shrinkfontfont-sizefont-size-adjustfont-stretchfont-variation-settingsfont-weightletter-spacingline-heightword-spacinggapgrid-column-gapgrid-gapgrid-row-gapgrid-template-columnsgrid-template-rowsheight
max-heightmin-heightinline-size
max-inline-sizemin-inline-sizeinsetinset-blockinset-block-endinset-block-startinset-inlineinset-inline-endinset-inline-startleftmargin
margin-bottommargin-leftmargin-rightmargin-topmargin-block-endmargin-block-startmargin-inline-endmargin-inline-startmask
mask-bordermask-positionmask-sizeobject-positionoffset
offset-anchoroffset-distanceoffset-pathoffset-positionoffset-rotateopacityorderoutline
outline-coloroutline-offsetoutline-widthpadding
padding-bottompadding-leftpadding-rightpadding-toppadding-block-endpadding-block-startpadding-inline-endpadding-inline-startperspectiveperspective-originrightrotaterow-gapscalescroll-marginscroll-margin-blockscroll-margin-block-endscroll-margin-block-startscroll-margin-bottomscroll-margin-inlinescroll-margin-inline-endscroll-margin-inline-startscroll-margin-leftscroll-margin-rightscroll-margin-topscroll-paddingscroll-padding-blockscroll-padding-block-endscroll-padding-block-startscroll-padding-bottomscroll-padding-inlinescroll-padding-inline-endscroll-padding-inline-startscroll-padding-leftscroll-padding-rightscroll-padding-topscroll-snap-coordinatescroll-snap-destinationscrollbar-colorshape-image-thresholdshape-marginshape-outsidetab-sizetext-decorationtext-decoration-colortext-decoration-thicknesstext-emphasistext-emphasis-colortext-indenttext-shadowtext-underline-offsettoptransformtransform-origintranslatevertical-alignvisibilitywidth
max-widthmin-widthz-indexzoomStarting with transitions, I have two axis:
The transition CSS property is shorthand for:
transition-delay takes a <time>transition-duration takes a <time>transition-property any property listed in the “Animatable CSS properties”
sectiontransition-timing-function takes an <easing-function>cubic-bezier(p1, p2, p3, p4)
An author-defined cubic-Bezier curve, where the p1 and p3 values must be in
the range of 0 to 1.ease (the default)
Equal to cubic-bezier(0.25, 0.1, 0.25, 1.0), the default value, increases in
velocity towards the middle of the transition, slowing back down at the end.ease-in
Equal to cubic-bezier(0.42, 0, 1.0, 1.0), starts off slowly, with the
transition speed increasing until complete.ease-out
Equal to cubic-bezier(0, 0, 0.58, 1.0), starts transitioning quickly, slowing
down the transition continues. •ease-in-out
Equal to cubic-bezier(0.42, 0, 0.58, 1.0), starts transitioning slowly, speeds
up, and then slows down again.linear
Equal to cubic-bezier(0.0, 0.0, 1.0, 1.0), transitions at an even speed.steps( n, <jumpterm>)jump-start or start
Denotes a left-continuous function, so that the first jump happens when
the transition begins;
jump-end or end
Denotes a right-continuous function, so that the last jump happens when
the animation ends;jump-none
There is no jump on either end. Instead, holding at both the 0% mark and
the 100% mark, each for 1/n of the durationjump-both
Includes pauses at both the 0% and 100% marks, effectively adding a step
during the transition time.step-start
Equal to steps(1, jump-start)step-end
Equal to steps(1, jump-end)<time>ms for milliseconds, s for seconds)0 MUST be 0ms or 0s to be validSource: https://developer.mozilla.org/en-US/docs/Web/CSS/time