Created
April 23, 2020 00:30
-
-
Save niceaji/1f0fb355415f918e2e80153f130a672f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="ko"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge" /> | |
<title>Game</title> | |
<style> | |
.box { | |
border: 1px solid black; | |
/* border-width: 1px; | |
border-style: solid; | |
border-color: #fff; */ | |
width: 400px; | |
height: 400px; | |
position: relative; | |
overflow: hidden; | |
} | |
#bug { | |
width: 20px; | |
height: 20px; | |
background-color: red; | |
position: absolute; | |
top: 35px; | |
left: 35px; | |
cursor: pointer; | |
} | |
.wrap { | |
margin: 10px auto; | |
width: 500px; | |
} | |
#point, | |
#life { | |
color: blue; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="wrap"> | |
<ul> | |
<li>빨간타겟이 box영역에서만 랜덤으로 출현</li> | |
<li>빨간타겟을 클릭하면 점수 +1</li> | |
<li>빨간타겟을 클릭못하면 생명 -1</li> | |
<li>생명이 0이면 gameover 메세지 출력</li> | |
</ul> | |
<div>점수 <span id="point">0</span></div> | |
<div>생명 <span id="life">10</span></div> | |
<div class="box"> | |
<div id="bug"></div> | |
</div> | |
</div> | |
<script src="quiz7.js"></script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment