<template>
<div class="hello">
<h1>{
{ msg }}</h1>
<div class="box">
<div class="boxchilde" @mouseenter="flag=true" @mouseleave="flag=false">
<div :class="flag?'passing':''"></div>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'HelloWorld',
data () {
return {
msg: 'Welcome to Your Vue.js App',
flag:false
}
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.box{
width: 100%;
height: 100%;
}
.boxchilde{
display: inline-block;
margin: 20px;
width: 200px;
height: 400px;
backgroun
vue鼠标经过动画
最新推荐文章于 2024-05-31 23:33:55 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)