File tree Expand file tree Collapse file tree 2 files changed +17
-8
lines changed
Expand file tree Collapse file tree 2 files changed +17
-8
lines changed Original file line number Diff line number Diff line change 1212 </ head >
1313 < body >
1414 < h1 > Whack-a-mole! < span class ="score "> 0</ span > </ h1 >
15- < h2 class ="timesUp " > </ h2 >
15+ < h2 class ="desc " > Hit as many trolls as you can in 10s! </ h2 >
1616 < button onclick ="startGame() "> Start!</ button >
17+ < h2 class ="timesUp "> </ h2 >
1718
1819 < div class ="game ">
1920 < div class ="hole hole1 ">
Original file line number Diff line number Diff line change @@ -16,15 +16,16 @@ body {
1616
1717h1 {
1818 text-align : center;
19- font-size : 10 rem ;
19+ font-size : calc ( 8 vh + 1 rem ) ;
2020 line-height : 1 ;
2121 margin-bottom : 0 ;
2222}
2323
2424.score {
2525 background : rgba (255 , 255 , 255 , 0.2 );
2626 padding : 0 3rem ;
27- line-height : 1 ;
27+ line-height : 2 ;
28+ font-size : calc (6vh + 1rem );
2829 border-radius : 1rem ;
2930}
3031
4445
4546.hole : after {
4647 display : block;
47- background : url (dirt.svg) bottom center no-repeat;
48- background-size : cover;
48+ background-image : url (dirt.svg);
49+ background-position : bottom center;
50+ background-repeat : no-repeat;
51+ background-size : contain;
4952 content : '' ;
5053 width : 100% ;
51- /* height: 70px; */
52- height : 12vh ;
54+ height : calc (6vh + 4rem );
5355 position : absolute;
5456 z-index : 2 ;
5557 bottom : -30px ;
@@ -78,13 +80,19 @@ button, h2 {
7880 height : 30px ;
7981}
8082
83+ .desc {
84+ width : 400px ;
85+ text-align : center;
86+ }
87+
8188@media only screen and (max-width : 450px ) {
8289 .game {
8390 width : 100vw ;
8491 height : 40vh ;
8592 margin : 0 ;
8693 }
8794 .hole : after {
88- height : 8vh ;
95+ height : calc (6vh + 1rem );
96+ background-position : center;
8997 }
9098}
You can’t perform that action at this time.
0 commit comments