123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
-
- <template>
- <div>
- <!-- :style="HomeStyle" -->
- <BackPage>
- <!-- <img :src="backHome" class="bg-image" /> -->
-
- <div class="TitleBox">
- <img :src="gameTitle" />
- </div>
- <div class="bth-div">
- <img :src="gameSatrt" class="bth-image" @click="linkTo" />
- <img :src="gameRule" class="bth-image" @click="goRule" />
- </div>
- </BackPage>
- </div>
- </template>
-
- <script >
- import { useRouter } from 'vue-router'
- import backHome from '@/assets/BackImage/backHome.jpg'
- import gameTitle from '@/assets/BackImage/首页大标.png'
-
- import gameSatrt from '@/assets/ButtonImage/开始游戏.png'
- import gameRule from '@/assets/ButtonImage/游戏规则.png'
-
- export default {
- setup() {
- const router = useRouter()
-
- const linkTo = () => {
- // 字符串路径
- // router.push('/about')
-
- // 带有路径的对象
- router.push({
- path: '/OverPage',
- query: {
- type: 'win'
- }
- })
- }
- const goRule = () => {
- // 字符串路径
- // router.push('/about')
-
- // 带有路径的对象
- router.push({
- path: '/TopRulePage',
- query: {
- // type: 'top'
- type: 'rule'
- }
- })
- }
-
- return {
- linkTo,
- backHome,
- gameSatrt,
- gameRule,
- gameTitle,
- goRule
- }
- }
- }
- </script>
-
- <style lang="less" scoped>
- // @keyframes scaleDraw {
- // 0% {
- // transform: scale(0.2);
- // }
- // 50% {
- // transform: scale(1.1);
- // }
- // 100% {
- // transform: scale(1);
- // }
- // }
- @keyframes scaleDraw {
- 0% {
- transform: scale(0.9);
- }
- 25% {
- transform: scale(1.1);
- }
- 45% {
- transform: scale(0.9);
- }
-
- 75% {
- transform: scale(1);
- }
- }
-
- .TitleBox {
- width: 99%;
- position: absolute;
- top: 15vh;
- display: flex;
- justify-content: center;
- animation: scaleDraw 1.4s ease-out 1;
-
- > img {
- width: 85%;
- height: 100%;
- }
- }
-
- .bg-image {
- // width: 100%;
- width: 100vw;
- }
- .bth-div {
- width: 33vw;
- position: absolute;
- top: 80vh;
- left: 35vw;
- display: flex;
- justify-content: center;
- .bth-image {
- width: 100%;
- }
- }
- </style>
|