react module.scss文件中弹窗中 keyframes动画不生效,

时间:2021-09-04 04:37:19   收藏:0   阅读:27

以下修改,亲测有效
非弹窗内动画写法 

.submit_btn{

   animation: submit_btn 1.5s infinite;

    -webkit-animation: submit_btn 1.5s infinite;

}

@keyframes submit_btn {
    0%,
    20%,
    80%,
    100% {
      transform: scale(1);
    }

    40%,
    50% {
      transform: scale(0.9);
    }
  }


弹窗内写法:在className后增加  :local
:global {
  .submit_btn :local {
    animation: submit_btn 2.5s ease-out;
  }
  @keyframes submit_btn {
    0%,
    20%,
    80%,
    100% {
      transform: scale(1);
    }

    40%,
    50% {
      transform: scale(0.9);
    }
  }
}

  

原文:https://www.cnblogs.com/xiaoyaoweb/p/15222377.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!