show css animation code example

Example 1: display transition css

div {
  background-color: blue;
  padding: 40px;
  color: white;
  cursor: pointer;
  transition: all .1s ease;
}

.hidden {
  visibility: hidden;
  opacity: 0;
  max-height: 0%;
}

.hidden:hover {
  visibility: visible;
  opacity: 1;
  max-height: 1000px;
}
<div class="hidden"></div>

Example 2: css move animation

article {
    animation-name            : displaceContent;
    animation-duration        : 1s;
    animation-delay           : 4s;
    animation-iteration-count : 1;
    animation-fill-mode       : forwards;
}
@keyframes displaceContent {
    from { transform : translateY(0em) }
    to   { transform : translateY(3em) } /* slide down to make room for advertisements */
}

Tags:

Css Example