On this page
  1. Keyframes, Fonts & Entry Animations
  2. Contents
  3. @keyframes
  4. @starting-style (Animating Entry from display: none)
  5. @font-face

Keyframes, Fonts & Entry Animations

Prev: Layers, Scope & Custom Properties | Up: at_rules | Next: tutorials
Rel: Custom Properties & Animation, Typography & Color
Ref: MDN Web Docs — @keyframes
Tags: #public #web #css #at-rules #animation


Contents


@keyframes

@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.toast {
  animation: fade-up 200ms ease-out both;
}

@starting-style (Animating Entry from display: none)

@starting-style defines initial styles for elements transitioning into view (such as <dialog> or [popover] elements):

dialog[open] {
  opacity: 1;
  transition: opacity 200ms ease, display 200ms allow-discrete;
}
@starting-style {
  dialog[open] { opacity: 0; }
}

@font-face

@font-face {
  font-family: "InterVar";
  src: url("inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

Linked from

Related notes