-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
40 lines (36 loc) · 882 Bytes
/
style.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
body {
margin: 0;
cursor: crosshair;
}
#container {
background-color: blue;
background-image: url(http://vignette2.wikia.nocookie.net/spongebobfanon/images/e/e8/1000x1000.jpg/revision/latest?cb=20140621172935);
background-size: cover;
height: 100vh;
width: 100vw;
overflow: hidden;
position: relative;
}
.food {
background-image: url(img/food.png);
background-size: contain;
background-repeat: no-repeat;
background-position: center;
height: 40px;
width: 30px;
position: absolute;
transform: translate(-50%,-50%);
transition: all .1s ease;
transform-origin: center center;
}
.food.being-eaten {
transform: rotateZ(30deg) scale(1.1) translate(-50%,-50%);
}
#fish {
height: 50px;
width: auto;
position: absolute;
transition: all .3s linear, height 500ms cubic-bezier(0.29, 30.3, 0.01, 2.51);
transform-origin: center left;
transform: translateY(-50%);
}