瀏覽代碼

蛋增加动画效果

tanxue 5 月之前
父節點
當前提交
f978831cfa
共有 1 個文件被更改,包括 8 次插入1 次删除
  1. 8 1
      common/styles/global/pages.scss

+ 8 - 1
common/styles/global/pages.scss

@@ -245,7 +245,14 @@
 		position: absolute;left: 20rpx;top:var(--status-bar-height);z-index: 2;
 	}
 	// animal
-	.animal-img{width:48rpx;height: 68rpx;@include ezy-no-repeat-cover;position: absolute;}
+		.animal-img{width:48rpx;height: 68rpx;@include ezy-no-repeat-cover;position: absolute;animation: shakeAndGrow 3s infinite;}
+		@keyframes shakeAndGrow {
+			0% {transform: translateX(0) scale(1);}
+			25% {transform: rotate(-20deg);}
+			50% {transform: rotate(20deg);}
+			75% {transform: rotate(0deg) scale(1.2);}
+			100% {transform: rotate(0deg) scale(1);}
+		}
 	.dan-img{background-image: url("@/static/images/study/animal-img1.png");}
 	.xiao-e-img{background-image: url("@/static/images/study/animal-img2.png");}
 	.zhong-e-img{background-image: url("@/static/images/study/animal-img3.png");}