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-family: 'Mario Kart';
src: url('../fonts/Mario-Kart-DS.ttf');
font-family: 'FIANSO';
src: url('../fonts/prstartk.ttf');
}
body{
@ -26,6 +26,98 @@ body{
.container{
max-width: 1140px;
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{
@ -34,6 +126,7 @@ body{
display: inline-block;
padding-top: 7px;
padding-bottom: 3px;
overflow: hidden;
}
.line{

BIN
assets/fonts/prstartk.ttf Normal file

Binary file not shown.

View File

@ -3,12 +3,6 @@
<meta charset="UTF-8">
<title>de_tank</title>
<link rel="stylesheet" href="./assets/css/style.css">
<style>
.col {
/* border: 1px solid black;*/
}
</style>
</head>
<body>
@ -17,6 +11,15 @@
</section>
<div class="container">
<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="col col-1"></div>
<div class="col col-2"></div>