问答详情
源自:9-8 CSS3中设置动画的播放状态

我想要鼠标移入时暂停,移出时动画播放,怎么弄

我想要鼠标移入时暂停,移出时动画播放,怎么弄?单纯的换一下paused和running好像并不行啊

提问者:慕数据4614238 2016-02-28 21:13

个回答

  • 慕斯3035540
    2016-08-14 21:24:22

    div:hover span {

      animation-play-state:paused;

    }

    动画正常写  running是默认值  不需要特意写   在划出写paused就好

  • qq_许会忘记你_03363744
    2016-05-18 15:47:51

     animation-play-state:running;

    }

    div:hover span {

      animation-play-state:paused;

    }换一下位置

    running和paused

  • mingling
    2016-04-15 15:27:38

    span {

      display: inline-block;

      width: 20px;

      height: 20px;

      background: orange;

      transform: translateY(90px);

      animation-name: move;

      animation-duration: 10s;

      animation-timing-function: ease-in;

      animation-delay: .2s;

      animation-iteration-count:infinite;

      animation-direction:alternate;

      animation-play-state:running;

    }

    div:hover span {

      animation-play-state:paused;

    }

    更改一下加粗的地方就可以了

  • primarywang
    2016-02-29 17:19:00

    把你代码贴出来啊