基于JavaScript配对游戏
当用户点击两个相同的图案或字符后配对成功,全部配对成功后游戏获胜
界面如下:
代码如下:
有兴趣的朋友欢迎继续完善 ^ _ ^
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>配对游戏</title>
<style type="text/css">
h2{
text-align: center;
}
hr{
background: deepskyblue;
height: 5px;
width: 600px;
}
table{
background: deepskyblue;
color: blue;
width: 500px;
height: 500px;
margin: 15px auto;
}
td{
text-align: center;
font-size: 50px;
background: greenyellow;
width: 100px;
height: 125px;
}
footer{
background: deepskyblue;
width: 600px;
padding: 10px;
margin: 15px auto;
text-align: center;
}
</style>