css3实现div从大到小再从小到大

css yekong

wanjunshijie 2021-04-26 at 19.44.35

css

@keyframes warn {
  0% {
    -moz-transform: scale(0.3);
    transform: scale(0.3);
    opacity: 1;
  }
  50% {
    -moz-transform: scale(1);
    transform: scale(1);
    opacity: 1;
  }
  100% {
    -moz-transform: scale(0.3);
    transform: scale(0.3);
    opacity: 1;
  }
}
.pulsex {
  -webkit-animation: warn 2.4s ease;
  -moz-animation: warn 2.4s ease;
  animation: warn 2.4s ease;
  -webkit-animation-iteration-count: infinite;
  -moz-animation-iteration-count: infinite;
  animation-iteration-count: infinite;
  background: url("../images/leida.png") no-repeat;
  background-size: 100% 100%;
  width: 180px;
  margin-top: -50%;
  margin-left: -50%;
  height: 180px;
  border-radius: 50%;
}
喜欢