Skip to content

Commit 2622a35

Browse files
✨ [css] Add Shake animation
1 parent 60c13b3 commit 2622a35

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
title: Shake Animation
3+
description: Adds a shake animation ( commonly used to mark invalid fields )
4+
author: AlsoKnownAs-Ax
5+
tags: css,animation
6+
---
7+
8+
```css
9+
.shake {
10+
animation: shake .5s ease-in-out;
11+
}
12+
13+
@keyframes shake {
14+
0%, 100% {
15+
transform: translateX(0);
16+
}
17+
25% {
18+
transform: translateX(-10px);
19+
}
20+
50% {
21+
transform: translateX(10px);
22+
}
23+
75% {
24+
transform: translateX(-10px);
25+
}
26+
}
27+
```

0 commit comments

Comments
 (0)