class="scan">view>
@keyframes move {
to {
background-position: 0 100%, 0 0, 0 0, 0 0;
/* 终止位置 */
clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
-webkit-clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
}
}
.scan {
width: 100;
height: 300px;
clip-path: polygon(0% 0%, 100% 0%, 100% 1.5%, 0% 1.5%);
-webkit-clip-path: polygon(0% 0%, 100% 0%, 100% 1.5%, 0% 1.5%);
background-image: linear-gradient(#1a98ca, #1a98ca),
linear-gradient(90deg, #ffffff33 1px, transparent 0, transparent 19px),
linear-gradient(#ffffff33 1px, transparent 0, transparent 19px),
linear-gradient(transparent, #1a98ca);
background-image: -webkit-linear-gradient(#1a98ca, #1a98ca),
-webkit-linear-gradient(90deg, #ffffff33 1px, transparent 0, transparent 19px),
-webkit-linear-gradient(#ffffff33 1px, transparent 0, transparent 19px),
-webkit-linear-gradient(transparent, #1a98ca);
animation: move 2s infinite linear;
-webkit-animation: move 2s infinite linear;
}
代码在模拟器和web上是有效的,真机上不行了,类似于一个扫描效果
请具体描述问题出现的流程,并提供能复现问题的简单代码片段https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html
不知道是clip-path还是linear-gradient()无效