Time for action – creating a game over dialog with the elapsed played time
We will continue with the code from the card matching game we made in Chapter 3, Building a Card-matching Game in CSS3. Carry out the following steps:
- Open the CSS3 matching game folder as our working directory.
- Download a background image from the following URL (we will use it as the background of the popup): http://mak.la/book-assets
- Place the image in the
index.htmlin any text editor.
- We will need a font for the game over popup. Add the following font embedding CSS into the
<link href="http://fonts.googleapis.com/css?family=Orbitron:400,700" rel="stylesheet" type="text/css">
- Before the
gamesection, we add a
timerto show the elapsed ...