# 图片闪光

<style>
.flash-container {
  width: 300px;
  height: 150px;
  background: #333333;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.flash-container::after {
  content: "";
  height: 150%;
  width: 25px;
  background: #fff;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom:0;
  margin: auto;
  opacity: .6;
  filter: blur(6px);
  animation: move 1s infinite ease-out;
}

@keyframes move {
  0% {
    transform: translate(-200px, -200px) rotate(45deg);
  }
  100% {
    transform: translate(200px, 200px) rotate(45deg);
  }
}
</style>
<template>
  <div class="flash-container">
    <img :src="require('./static/bg1.jpg')" alt="" />
  </div>
</template>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
显示代码 复制代码
上次更新: 2023-10-28