Add Score + Game Over

master
orphevs 2017-12-09 04:20:54 +01:00
parent 9e1658a142
commit bff058002d
3 changed files with 104 additions and 8 deletions

View File

@ -1,6 +1,6 @@
@font-face{ @font-face{
font-family: 'Mario Kart'; font-family: 'FIANSO';
src: url('../fonts/Mario-Kart-DS.ttf'); src: url('../fonts/prstartk.ttf');
} }
body{ body{
@ -26,6 +26,98 @@ body{
.container{ .container{
max-width: 1140px; max-width: 1140px;
margin: auto; margin: auto;
position: absolute;
left: 0;
right: 0;
margin-left: auto;
margin-right: auto;
}
.score{
position: absolute;
right: 0px;
top: 0px;
text-align: right;
padding-top: 20px;
padding-right: 20px;
}
.score h3{
font-family: 'FIANSO';
font-size: 32px;
color: #000;
margin: inherit;
padding-bottom: 8px;
}
.score h5{
font-family: 'FIANSO';
font-size: 24px;
color: #000;
margin: inherit;
}
.gameover{
text-align: center;
position: absolute;
width: 100%;
height: 73%;
top: 0;
padding-top: 150px;
background: rgba(155, 0, 0, 0.85);
box-shadow: inset 0px 0px 60px 0px rgba(0,0,0,0.75);
}
.gameover h1{
font-family: 'FIANSO';
font-size: 64px;
color: #fff;
margin: inherit;
padding-bottom: 60px;
animation: pulse 3s infinite;
}
@keyframes pulse{
0%{
transform: scale(1);
}
50%{
transform: scale(1.15);
}
100%{
transform: scale(1);
}
}
.gameover h4{
font-family: 'FIANSO';
font-size: 18px;
color: #fff;
margin: inherit;
padding-bottom: 100px;
opacity: 0.8;
}
.gameover a{
font-family: 'FIANSO';
font-size: 18px;
color: #fff;
margin: inherit;
text-align: center;
border: solid 3px #fff;
border-radius: 6px;
padding: 12px 24px;
text-decoration: none;
transition: 0.3s;
position: relative;
z-index: 5;
}
.gameover a:hover{
background: #fff;
color: #000;
} }
.map{ .map{
@ -34,6 +126,7 @@ body{
display: inline-block; display: inline-block;
padding-top: 7px; padding-top: 7px;
padding-bottom: 3px; padding-bottom: 3px;
overflow: hidden;
} }
.line{ .line{

BIN
assets/fonts/prstartk.ttf Normal file

Binary file not shown.

View File

@ -3,12 +3,6 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>de_tank</title> <title>de_tank</title>
<link rel="stylesheet" href="./assets/css/style.css"> <link rel="stylesheet" href="./assets/css/style.css">
<style>
.col {
/* border: 1px solid black;*/
}
</style>
</head> </head>
<body> <body>
@ -17,6 +11,15 @@
</section> </section>
<div class="container"> <div class="container">
<section class="map"> <section class="map">
<div class="score">
<h3>SCORE</h3>
<h5>999</h5>
</div>
<div class="gameover">
<h1>GAME OVER</h1>
<h4>Votre score : 999</h4>
<a href="#">Rejouer</a>
</div>
<div class="line line-1"> <div class="line line-1">
<div class="col col-1"></div> <div class="col col-1"></div>
<div class="col col-2"></div> <div class="col col-2"></div>