<template>
<div class="manage">
<div class="img-body">
<div class="main" :style="theStyle" />
</div>
</div>
</template>
<script>
export default {
name: 'Management',
components: {},
data() {
return {
timer: null,
theStyle: {
}
};
},
computed: {
},
created() {},
mounted() {
this.transform();
},
methods: {
transform() {
let index = 0;
setInterval(() => {
index++;
console.log('####', index);
this.theStyle = { transform: `rotateX(0deg) rotateY(0deg) rotateZ(${index}deg) scaleX(1) scaleY(1) translateX(0px) translateY(0px)` };
if (index === 360) {
index = 0;
}
}, 10);
}
}
};
</script>
<style lang="scss" scoped>
.manage {
color: #fff;
font-size: 36px;
font-weight: 600;
height: 100%;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
.img-body{
width: 94px;
height: 94px;
.main{
height: 100%;
width: 100%;
background-image: url("~@/assets/img/test2.png");
mix-blend-mode: normal;
opacity: 1;
}
}
}
</style>
最终效果如下: