transition rotate 滾動效果問題

多個效果嵌套問題,想實現(xiàn)平移的時候子元素同時有滾動效果

.numberBox{
  position:relative;
  width:72px;
  height:24px;
  .num-count{
    position:absolute;
    left:24px;
    top:0;
    input{
      width:24px;
      height:24px;
      text-align:center;
    }
  }
  .num-decrease{
    position:absolute;
    left:0;
    top:0;
    font-size:24px;
    color:#00A0DC;
  }
  .num-add{
    position:absolute;
    right:0;
    top:0;
    font-size:24px;
    color:#00A0DC;
  }
}
  .move-enter,.move-leave-to{
    opacity:0;
    transform: translateX(24px);
    .num-decrease{
      transform: rotate(0);
    }
  }
  .move-enter-active,.move-leave-active{
  transition: all 0.5s linear;
  .num-decrease{
    transition: all 0.5s linear;
  }
}
  .move-enter-to,.move-leave {
    opacity: 1;
    transform: translateX(0);
    .num-decrease {
      transform: rotate(180deg);
    }
  }

發(fā)現(xiàn)只有enter的時候有效果,leave的時候沒有旋轉(zhuǎn)效果,不知道為什么?
將0 和180deg 分別改為 180deg 和 360deg 就正常了,不明白為什么?

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

友情鏈接更多精彩內(nèi)容