利用CSS控制图片的旋转与透明度

 1:设备总数,生产中,待机中,图片旋转

2:故障图片利用透明度做呼吸灯闪烁效果。

  <a-card :bordered="false" class="card">
            <a-spin tip="Loading..." :spinning="spinning3">
              <a-row :gutter="16">
                <a-col :span="5" style="text-align: center">
                  <img src="../../image/Gaps/dept.png" class="img" />
                  <p class="p-content" style="font-size: 14px; color: aliceblue">设备总数</p>
                  <p style="font-size: 32px; color: aliceblue">{{ entity.Sum }}台</p>
                </a-col>
                <a-col :span="5" style="text-align: center">
                  <img src="../../image/Smact/work.png" class="img" />
                  <p class="p-content" style="font-size: 16px; color: aliceblue">生产中</p>
                  <p style="font-size: 32px; color: rgb(95, 166, 254)">{{ entity.Work }}台</p>
                </a-col>
                <a-col :span="5" style="text-align: center">
                  <img src="../../image/Smact/run.png" class="img" />
                  <p class="p-content" style="font-size: 16px; color: aliceblue">待机中</p>
                  <p style="font-size: 32px; color: rgb(64, 211, 54)">{{ entity.Standby }}台</p>
                </a-col>
                <a-col :span="5" style="text-align: center">
                  <img src="../../image/Smact/warning.png" class="waring" />
                  <p class="p-content" style="font-size: 16px; color: aliceblue">故障</p>
                  <p style="font-size: 32px; color: red">{{ entity.Warning }}台</p>
                </a-col>
                <a-col :span="4" style="text-align: center">
                  <img src="../../image/Smact/stop.png" class="img_1" />
                  <p class="p-content" style="font-size: 16px; color: aliceblue">关机</p>
                  <p style="font-size: 32px; color: rgb(110, 110, 110)">{{ entity.Stop }}台</p>
                </a-col>
              </a-row>
            </a-spin>
          </a-card>

<style>
.waring {
  width: 40px;
  height: 40px;
  margin-left: 10px;
  text-align: center;
  animation: glow 800ms ease-out infinite alternate;
}
@keyframes glow {
  0% {
    opacity: 0.01;
  }
  100% {
    opacity: 1;
  }
}
.img {
  width: 40px;
  height: 40px;
  margin-left: 25px;
  display: block;
  animation: rotate 6s linear infinite;
}
@keyframes rotate {
  0% {
    transform: rotateZ(0deg); /*从0度开始*/
  }
  100% {
    transform: rotateZ(360deg); /*360度结束*/
  }
}
</style>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值