CSS Animation Properties

backgroundbackground-colorbackground-imagebackground-positionbackground-sizeborderborder-bottomborder-bottom-colorborder-bottom-left-radiusborder-bottom-right-radiusborder-bottom-widthborder-colorborder-imageborder-image-outsetborder-image-sliceborder-image-sourceborder-image-widthborder-leftborder-left-colorborder-left-widthborder-radiusborder-rightborder-right-colorborder-right-widthborder-spacingborder-topborder-top-colorborder-top-left-radiusborder-top-right-radiusborder-top-widthborder-widthbottombox-shadowclipclip-pathcolorcolumn-countcolumn-gapcolumn-rulecolumn-rule-colorcolumn-rule-widthcolumn-widthcolumnsfilterflexflex-basisflex-growflex-shrinkfontfont-sizegapgridgrid-auto-columnsgrid-column-gapgrid-gapgrid-row-gapgrid-templategrid-template-columnsgrid-template-rowsheightleftletter-spacingline-heightmarginmargin-bottommargin-leftmargin-rightmargin-topmask-imagemask-positionmask-sizemax-heightmax-widthmin-heightmin-widthobject-positionopacityoutlineoutline-coloroutline-offsetoutline-widthpaddingpadding-bottompadding-leftpadding-rightpadding-topperspectiveperspective-originrightrow-gaptext-decorationtext-decoration-colortext-decoration-thicknesstext-indenttext-shadowtoptransformtransform-originvertical-alignwidthword-spacingz-index

CSS border-radius animation property


with the border-radius property you can animate border radius(for four border corners).

Values

This is the value you will use with border-radius property

ValueDescription
lengthA length value in px, pt, cm, em, etc. Negative values are not allowed.
percentageThe size of the radius in percentage. In case of elliptical corners, percentage for the horizontal radius is calculated with respect to the width of the element's box, while percentage for the vertical radius is calculated with respect to the height of the element's box. Negative values are not allowed.

Example


One Value

@keyframes myAnimation {
   from {
      
border-radius
 
length
   }
   to {
      
border-radius
 
length
   }
}
@keyframes myAnimation {
   0% {
      
border-radius
 
length
   }
   100% {
      
border-radius
 
length
   }
}

Two Values

@keyframes myAnimation {
   from {
      
border-radius
 
length  length
   }
   to {
      
border-radius
 
length  length
   }
}
@keyframes myAnimation {
   0% {
      
border-radius
 
length  length
   }
   100% {
      
border-radius
 
length  length
   }
}

Three Values

@keyframes myAnimation {
   from {
      
border-radius
 
length  length  length
   }
   to {
      
border-radius
 
length  length  length
   }
}
@keyframes myAnimation {
   0% {
      
border-radius
 
length  length  length
   }
   100% {
      
border-radius
 
length  length  length
   }
}

Four Values

@keyframes myAnimation {
   from {
      
border-radius
 
length length  length  length
   }
   to {
      
border-radius
 
length length  length  length
   }
}
@keyframes myAnimation {
   0% {
      
border-radius
 
length length  length  length
   }
   100% {
      
border-radius
 
length length  length  length
   }
}

References