After Width: | Height: | Size: 69 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 29 KiB |
@ -1,8 +1,61 @@ |
|||||
<template> |
<template> |
||||
入口页 |
<div class="container"> |
||||
<button @click="$router.push({ name: 'Train' })">进入游戏</button> |
<div class="btn-container"> |
||||
|
<div class="btn btn-in" @click="$router.push({ name: 'Train' })"></div> |
||||
|
<div class="btn btn-out" @click="handleQuit"></div> |
||||
|
</div> |
||||
|
</div> |
||||
</template> |
</template> |
||||
|
|
||||
<script setup></script> |
<script setup> |
||||
|
// 退出 |
||||
|
function handleQuit() { |
||||
|
window.postMessage('quit', '*'); |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
<style scoped></style> |
<style scoped> |
||||
|
.container { |
||||
|
width: 1280rem; |
||||
|
height: 720rem; |
||||
|
position: absolute; |
||||
|
left: 50%; |
||||
|
top: 50%; |
||||
|
transform: translate3d(-50%, -50%, 0); |
||||
|
background: url(../assets/page1/bg.jpg) no-repeat center center; |
||||
|
background-size: 1280rem 720rem; |
||||
|
} |
||||
|
.btn-container { |
||||
|
position: absolute; |
||||
|
left: 50%; |
||||
|
width: 348rem; |
||||
|
top: 420rem; |
||||
|
transform: translate3d(-50%, 0, 0); |
||||
|
} |
||||
|
.btn { |
||||
|
width: 348rem; |
||||
|
height: 113rem; |
||||
|
background-size: 100%; |
||||
|
background-repeat: no-repeat; |
||||
|
background-position: center; |
||||
|
} |
||||
|
.btn-in { |
||||
|
background-image: url('../assets/page1/in.png'); |
||||
|
margin-bottom: 20rem; |
||||
|
} |
||||
|
.btn-in:hover { |
||||
|
background-image: url('../assets/page1/in-hover.png'); |
||||
|
} |
||||
|
.btn-in:active { |
||||
|
background-image: url('../assets/page1/in-active.png'); |
||||
|
} |
||||
|
.btn-out { |
||||
|
background-image: url('../assets/page1/out.png'); |
||||
|
} |
||||
|
.btn-out:hover { |
||||
|
background-image: url('../assets/page1/out-hover.png'); |
||||
|
} |
||||
|
.btn-out:active { |
||||
|
background-image: url('../assets/page1/out-active.png'); |
||||
|
} |
||||
|
</style> |
||||
|