feat: add main page
This commit is contained in:
parent
c95194ba30
commit
1212340bc5
38
index.html
38
index.html
@ -0,0 +1,38 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>游戏开始页面</title>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
width: 1280px;
|
||||||
|
height: 731px;
|
||||||
|
background-image: url('src/pic/startpage.png');
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
#start-button {
|
||||||
|
background-image: url('src/pic/start.png');
|
||||||
|
width: 1280px; /* 按钮的宽度 */
|
||||||
|
height: 731px; /* 按钮的高度 */
|
||||||
|
background-color: transparent;
|
||||||
|
border: none;
|
||||||
|
cursor: pointer;
|
||||||
|
background-size: contain;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<button id="start-button" onclick="startGame()"></button>
|
||||||
|
<script>
|
||||||
|
function startGame() {
|
||||||
|
// 这里可以添加进入游戏的代码,例如跳转到游戏页面
|
||||||
|
window.location.href = 'game.html'; // 假设游戏页面为game.html
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
x
Reference in New Issue
Block a user