Fix preloading image

This commit is contained in:
t510599 2018-06-02 01:54:51 +08:00
parent 7be510921a
commit 84747dc6a9
2 changed files with 4 additions and 2 deletions

View File

@ -10,8 +10,6 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/tocas-ui/2.3.3/tocas.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link rel="stylesheet" href="./gameUI.css">
<link rel="preload" href="./won.png" as="image">
<link rel="preload" href="./lose.png" as="image">
</head>
<body>
<div class="ts grid" id="grid">

View File

@ -85,4 +85,8 @@ p.result.enemy.name {
}
p.result.player.name {
right: 1.5em;
}
body::after{
position:absolute; width:0; height:0; overflow:hidden; z-index:-1;
content:url('./won.png') url('./lose.png');
}