当前位置:网站首页>The source code of live broadcast app system, and the rotation diagram of upper and lower layers
The source code of live broadcast app system, and the rotation diagram of upper and lower layers
2022-07-27 22:07:00 【Cloudleopard network technology】
live broadcast app System source code , Top and bottom layer style rotation chart
<template>
<div class="article-main" @mouseover='mouseOver()' @mouseleave="mouseLeave()">
<img src="../../assets/a3.jpeg" :class="v1" />
<img src="../../assets/a2.jpeg" :class="v2" />
<img src="../../assets/a1.jpeg" :class="v3" />
<div class="dot-view">
<div :class="dot1">
</div>
<div :class="dot2">
</div>
<div :class="dot3">
</div>
</div>
<div class="arrow-view" v-show="isActive">
<img src="../../assets/btn-l-d.png" class="arrow-left" @click="toLeft()" />
<img src="../../assets/btn-r-d.png" class="arrow-right" @click="toRight()" />
</div>
</div>
</template>
<script>
export default {
name: 'home',
data() {
return {
timer: '',
isActive: false,
value: 1,
v1: 'banner wz1',
v2: 'banner wz2',
v3: 'banner wz3',
dot1: 'dot-1 dot-color-actived',
dot2: 'dot-2 dot-color-normal',
dot3: 'dot-3 dot-color-normal'
}
},
methods: {
toLeft() {
this.value--
if (this.value == 0) {
this.value = 3
}
this.changeClasss()
},
toRight() {
this.value++
if (this.value > 3) {
this.value = 1
}
this.changeClasss()
},
mouseOver() {
this.isActive = true
clearInterval(this.timer);
},
// Removed from the
mouseLeave() {
this.isActive = false
this.timer = setInterval(this.get, 3000);
},
changeClasss() {
if (this.value == 1) {
this.v1 = 'banner wz1'
this.v2 = 'banner wz2'
this.v3 = 'banner wz3'
this.dot1 = 'dot-1 dot-color-actived'
this.dot2 = 'dot-2 dot-color-normal'
this.dot3 = 'dot-3 dot-color-normal'
}
if (this.value == 2) {
this.v1 = 'banner wz2'
this.v2 = 'banner wz3'
this.v3 = 'banner wz1'
this.dot1 = 'dot-1 dot-color-normal'
this.dot2 = 'dot-2 dot-color-actived'
this.dot3 = 'dot-3 dot-color-normal'
}
if (this.value == 3) {
this.v1 = 'banner wz3'
this.v2 = 'banner wz2'
this.v3 = 'banner wz1'
this.dot1 = 'dot-1 dot-color-normal'
this.dot2 = 'dot-2 dot-color-normal'
this.dot3 = 'dot-3 dot-color-actived'
}
},
get() {
this.value++;
if (this.value > 3) {
this.value = 1
}
this.changeClasss()
}
},
mounted() {
this.timer = setInterval(this.get, 3000);
},
beforeDestroy() {
clearInterval(this.timer);
},
}
</script>
<style scoped>
.arrow-left {
position: absolute;
left: 20px;
top: 250px;
cursor: pointer;
}
.arrow-right {
position: absolute;
left: 280px;
top: 250px;
cursor: pointer;
}
.article-main {
width: 320px;
height: 300px;
background-color: #aaffff;
position: relative;
}
.banner {
border-radius: 4px;
position: absolute;
transition: all 1s;
}
.wz1 {
width: 280px;
height: 200px;
left: 20px;
z-index: 777;
top: 20px;
}
.wz2 {
width: 290px;
height: 200px;
left: 15px;
top: 30px;
z-index: 888;
}
.wz3 {
width: 300px;
height: 200px;
left: 10px;
top: 40px;
z-index: 999;
}
.dot-view {
position: absolute;
left: 120px;
top: 255px;
display: flex;
flex-direction: row;
}
.dot-color-actived {
background-color: #ff0000;
}
.dot-color-normal {
background-color: #333;
}
.dot-1 {
width: 10px;
height: 10px;
border-radius: 50%;
}
.dot-2 {
width: 10px;
height: 10px;
border-radius: 50%;
margin-left: 20px;
}
.dot-3 {
margin-left: 20px;
width: 10px;
height: 10px;
border-radius: 50%;
}
</style>
That's all live broadcast app System source code , Top and bottom layer style rotation chart , More content welcome to follow the article
边栏推荐
- Log4j 漏洞仍普遍存在?
- V2.x synchronization is abnormal. There are a lot of posts that cannot be synchronized in the cloud, and the synchronization is blocked and slow
- Reentranlock and source code analysis (learn ideas and click the source code step by step)
- 【StoneDB故障诊断】系统资源瓶颈诊断
- Software testing interview question: what is the focus of unit testing, integration testing, and system testing?
- Simple manual implementation of map
- Internal class (detailed explanation of four internal classes)
- Implementation of arbitrary code execution based on.Net dynamic compilation technology
- Is it safe to open an account online now? Then choose which securities to open a securities account
- Huawei establishes global ecological development department: fully promote HMS global ecological construction
猜你喜欢

8000字讲透OBSA原理与应用实践

高并发遇到死锁了,如何搞?

Inertial navigation principle (VII) -imu error classification (II) -allan variance analysis method +imu test + calibration introduction

Encapsulate an array into a class

项目分析(哪些是it培训给不了)

IDEA常用快捷键及设置方法
![[question 23] Sudoku game with rotation | DFS (Beijing Institute of Technology / Beijing Institute of Technology / programming methods and practice / primary school)](/img/75/c207f4f562fd5b547c5b3134113154.jpg)
[question 23] Sudoku game with rotation | DFS (Beijing Institute of Technology / Beijing Institute of Technology / programming methods and practice / primary school)

C language output teaching calendar

ThreadLocal principle and source code analysis (click in step by step, don't recite, learn ideas)

8000字讲透OBSA原理与应用实践
随机推荐
Ziguang zhanrui: dozens of 5g terminals based on chunteng 510 will be commercially available in 2020
看起来是线程池的BUG,但是我认为是源码设计不合理。
Project analysis (what is it training that can't be given)
Simple manual implementation of map
除了「加机器」,其实你的微服务还能这样优化
Mysql 数据恢复流程 基于binlog redolog undolog
Encapsulate an array into a class
C language output teaching calendar
2021-11-05 understand main method syntax, code block and final keyword
2021-11-05类变量和类方法的理解
成员方法及其传参机制
Station B collapsed. What did the developer responsible for the repair do that night?
Will the United States prohibit all Chinese enterprises from purchasing American chips? Trump responded like this
Log4j 漏洞仍普遍存在?
Project analysis (from technology to project and product)
The design idea of relational database is obvious to you in 20 pictures
九天后我们一起,聚焦音视频、探秘技术新发展
STM32项目分享---MQTT智能门禁系统(含APP控制)
JVM memory model interview summary
8000字讲透OBSA原理与应用实践