修改返回顶部样式

base
JayChou 6 months ago
parent 818816b289
commit 4c504f76d4
  1. 43
      src/Layout/index.vue
  2. BIN
      src/assets/images/jinglingtu.png
  3. BIN
      src/assets/images/top1.png
  4. BIN
      src/assets/images/top2.png
  5. BIN
      src/assets/images/top3.png
  6. BIN
      src/assets/images/top4.png
  7. BIN
      src/assets/images/top5.png
  8. 2
      src/views/registrationGroup/index.vue

@ -22,15 +22,24 @@ const scrollToTop = () => {
flog.value = true
const dom = document.querySelector('.gotop') as Element
console.log(dom)
totop.value.style.backgroundPosition = '-6px -145px'
setTimeout(() => {
totop.value.style.backgroundPosition = '-363px -78px'
totop.value.classList.add('top1');
}, 200)
setTimeout(() => {
totop.value.style.backgroundPosition = '-316px -78px'
totop.value.classList.remove('top1');
totop.value.classList.add('top5');
}, 400)
setTimeout(() => {
totop.value.style.backgroundPosition = '-6px -80px'
totop.value.classList.remove('top5');
totop.value.classList.add('top4');
totop.value.style.height = '60px'
scrollTop()
@ -88,14 +97,20 @@ onMounted(() => {
position: fixed;
bottom: 50px;
right: 50px;
background-image: url('../assets/images/jinglingtu.png');
background-position: -264px -78px;
// background-image: url('../assets/images/jinglingtu.png');
background: url('../assets/images/top3.png') no-repeat;
background-size: contain;
// background-position: -264px -78px;
transition: top 0.2s linear;
animation: show 0.5s ease-in-out;
}
.gotop:hover {
transition: background-image 0.2s ease-in;
background-position: -215px -78px;
// background-position: -215px -78px;
background: url('../assets/images/top2.png') no-repeat;
background-size: contain;
}
.bian {
animation: bian 0.1s ease-in-out;
@ -131,4 +146,18 @@ onMounted(() => {
// top: 10%;
// }
// }
.top1{
background: url('../assets/images/top1.png') no-repeat !important;
background-size: contain !important
}
.top4{
background: url('../assets/images/top4.png') no-repeat !important;
background-size: contain !important
}
.top5{
background: url('../assets/images/top5.png') no-repeat !important;
background-size: contain !important
}
</style>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

@ -120,7 +120,7 @@
<el-input v-model="ruleForm.entryFormat" type="text" disabled />
</el-form-item>
<el-form-item label="队伍名称" prop="teamName">
<el-input v-model="ruleForm.teamName" type="text" :disabled="isDisable"/>
<el-input v-model="ruleForm.teamName" maxlength="30" type="text" :disabled="isDisable"/>
</el-form-item>
<el-form-item label="选择题目" prop="topicid">
<el-select v-model="ruleForm.topicid" placeholder="请选择题目" :disabled="isDisable">

Loading…
Cancel
Save