Skip to content

Commit 86bd4db

Browse files
Merge pull request #262 from shrey141102/main
added the 2048 game
2 parents c741de7 + 00e8f5e commit 86bd4db

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1166
-0
lines changed

2048/.gitignore

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.DS_Store
2+
Thumbs.db
3+
db.json
4+
*.log
5+
node_modules/
6+
public/
7+
.deploy*/
8+
.history

2048/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# 2048 project made using HTML CSS Javascript
2+
3+

2048/css/keyframes.css

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
@keyframes moveup{
2+
0%{
3+
transform: translateY(0);
4+
opacity: 1;
5+
}
6+
100%{
7+
transform: translateY(-150px);
8+
opacity: 0;
9+
}
10+
}
11+
@keyframes appear{
12+
0%{
13+
transform: scale(0);
14+
}
15+
100%{
16+
transform: scale(1);
17+
}
18+
}
19+
@keyframes add{
20+
0%{
21+
transform: scale(1);
22+
box-shadow: 0 0 1px red;
23+
}
24+
50%{
25+
transform: scale(1.2);
26+
}
27+
100%{
28+
transform: scale(1);
29+
}
30+
}

2048/css/media.css

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
@media screen and (max-width:1250px){
2+
html,body{
3+
font-size: 15px;
4+
}
5+
.container{
6+
width: 280px;
7+
}
8+
h1.title{
9+
font-size: 31px;
10+
}
11+
.score-container,
12+
.best-container{
13+
padding: 3px 10px;
14+
}
15+
.game-container{
16+
margin-top: 10px;
17+
width: 280px;
18+
height: 280px;
19+
}
20+
.grid-container,
21+
.tile-container{
22+
width: 260px;
23+
height: 260px;
24+
}
25+
.grid-row,
26+
.tile{
27+
height: 22.75%;
28+
}
29+
.grid-cell,
30+
.tile{
31+
width: 22.75%;
32+
}
33+
.grid-row{
34+
margin-bottom: 3%;
35+
}
36+
.grid-cell{
37+
margin-right: 3%;
38+
}
39+
.tile{
40+
font-size: 35px;
41+
}
42+
.tile[data-val="128"],
43+
.tile[data-val="256"],
44+
.tile[data-val="512"]{
45+
font-size: 25px;
46+
}
47+
.tile[data-val="1024"],
48+
.tile[data-val="2048"]{
49+
font-size: 21px;
50+
}
51+
52+
.pop-container p{
53+
font-size: 30px;
54+
}
55+
}

0 commit comments

Comments
 (0)