Created
March 9, 2022 14:37
-
-
Save chunkydotdev/99fdd323c137d2894825a775f04656a5 to your computer and use it in GitHub Desktop.
Fishbubble in typescript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import styled from 'styled-components' | |
const FishBubble = styled.div<{ x: number; y: number }>` | |
top: ${({ y }) => y}%; | |
left: ${({ x }) => x}px; | |
position: absolute; | |
height: 4px; | |
width: 4px; | |
background-color: white; | |
animation: up 1.5s linear forwards; | |
@keyframes up { | |
0% { | |
transform: translateY(0); | |
opacity: 1; | |
} | |
100% { | |
transform: translateY(-200px); | |
opacity: 0; | |
} | |
} | |
` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment