@carmenansio
@carmenansio
@carmenansio
@carmenansio
@media (prefers-reduced-motion: no-preference) {
/* your fancy motion */
}
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
animation
transition
transform
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
button {
background: white;
transition: background 0.5s linear;
}
button:hover {
background: green;
}
@carmenansio
@carmenansio
button {
transition: background 0.5s linear;
/*long-hand*/
transition-property: all;
transition-duration: 0.4s;
transition-timing-function: ease-out;
transition-delay: 0;
}
@carmenansio
button {
transition: background 0.5s linear;
/*long-hand*/
transition-property: all;
transition-duration: 0.4s;
/*transition-timing-function: ease-out;*/
transition-timing-function: cubic-bezier(.59,-0.26,.33,1.42)
}
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@keyframes grow {
from {
transform: scale(1);
}
to {
transform: scale(2);
}
}
@carmenansio
@keyframes grow {
0% {
transform: scale(1);
}
50% {
transform: scale(1.5);
}
100% {
transform: scale(2);
}
}
@carmenansio
.class {
animation: grow 5s linear 1s;
}
@keyframes grow {
from {
transform: scale(1);
}
to {
transform: scale(2);
}
}
@carmenansio
@carmenansio
@carmenansio
@carmenansio
transition-duration: Establece la duracion de una transicion.
transition-delay: Establece el retraso antes de que se inicie una transicion.
animation-duration: Establece la duracion de una animacion.
animation-delay: Establece el retraso antes de que se inicie una animacion.
@carmenansio
.mi-elemento {
/* Establecemos una transición de 1 segundo */
transition-duration: 1s;
/* Establecemos un retraso de 0,5 segundos antes de que se inicie la transición */
transition-delay: 0.5s;
/* Establecemos una animación de 2 segundos */
animation-duration: 2s;
/* Establecemos un retraso de 1 segundo antes de que se inicie la animación */
animation-delay: 1s;
}
@carmenansio
@carmenansio
.class {
animation:
move-left 2s linear,
change-color 4s linear;
}
@carmenansio
@carmenansio
.class {
animation:
move-left 5s linear 0s, /* Comienza a los 0s */
look-down 2.5s linear 5s, /* Comienza a los 5s (5 de la anterior) */
move-right 5s linear 7.5s, /* Comienza a los 7.5s (5 + 2.5 de la anterior) */
dissapear 2s linear 9.5s; /* Comienza a los 9.5s (5 + 2.5 + 2 de la anterior) */
}
@carmenansio
.item {
width: 100px;
height: 100px;
background: grey;
animation:
move 3s infinite 0s,
rotate 3s infinite 3s;
animation-composition: replace;
}
@keyframes move {
to {
transform: translateX(500px);
background: red;
}
}
@keyframes rotate {
to {
transform: rotate(360deg) scale(0.5);
background: indigo;
}
}
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
.fill {
animation: progress linear forwards;
animation-timeline: scroll();
}
@keyframes progress {
from {
stroke-dasharray: 0px 1px;
}
to {
stroke-dasharray: 1px 1px;
}
}
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
img {
animation: 2s infinite alternate zoomin;
}
@keyframes zoomin {
from {
margin-left: 100%;
width: 300%;
}
to {
margin-left: 0%;
width: 100%;
}
}
@carmenansio
.element {
animation-name: slidein;
animation-duration: 2s;
animation-timing-function: ease-in-out;
}
@keyframes slidein {
from {
transform: translateX(100%);
}
to {
transform: translateX(0);
}
}
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@keyframes zoomin {
from {
margin-left: 100%;
width: 0%;
}
to {
margin-left: 0%;
width: 50%;
}
}
@carmenansio
img {
animation: zoomin 2s infinite alternate;
}
@carmenansio
img {
animation: zoomin linear both;
animation-timeline: scroll();
}
@carmenansio
@carmenansio
animation-timeline: scroll();
animation-timeline: view();
@carmenansio
@carmenansio
@carmenansio
https://webstatus.dev/features/scroll-driven-animations?q=scroll+driven
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
animation-timeline: scroll(root);
@carmenansio
@supports (animation-timeline: scroll()) {
/* your cool scrolly motion */
}
@carmenansio
@carmenansio
@carmenansio
.content {
animation: appear linear;
animation-range: entry 0% entry 100%;
animation-timeline: view();
}
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
@carmenansio
.content {
animation: appear linear;
animation-range: entry 0% entry 100%;
animation-timeline: view();
}
@carmenansio
@carmenansio
img {
width: 100%;
aspect-ratio: 16/9;
object-fit: cover;
/*timeline*/
view-timeline-name: --image;
view-timeline-axis: block;
/*animation*/
animation-timeline: --image;
animation-name: scroll;
/*range*/
animation-range: entry 25% cover 30%;
animation-fill-mode: both;
}
@carmenansio
@carmenansio
@carmenansio