问答详情
源自:9-1 CSS3 Keyframes介绍

如果要同时兼容火狐和谷歌浏览器,要怎么写啊,一起写就没效果,如


@-webkit-keyframes changecolor,@keyframes changecolor { ... }

提问者:威廉依飞 2015-06-10 18:29

个回答

  • Thinker_Ac
    2015-07-11 23:17:27

    不能一起写啊,分开写多条就行了,像楼上的同学一样。

  • 菜鸟要升级
    2015-06-26 17:08:17

    @-webkit-keyframes moveDown{

    0%{

    -webkit-transform:translateY(-40px);

    opacity:0;

    }

    100%{

    -webkit-transform:translateY(0px);

    opacity: 1;

    }

    }

    @-moz-keyframes moveDown{

    0%{

    -moz-transform:translateY(-40px);

    opacity:0;

    }

    100%{

    -moz-transform:translateY(0px);

    opacity: 1;

    }

    }

    @-ms-keyframes moveDown{

    0%{

    -webkit-transform:translateY(-40px);

    opacity:0;

    }

    100%{

    -webkit-transform:translateY(0px);

    opacity: 1;

    }

    }

    @-o-keyframes moveDown{

    0%{

    -o-transform:translateY(-40px);

    opacity:0;

    }

    100%{

    -o-transform:translateY(0px);

    opacity: 1;

    }

    }

    @keyframes moveDown{

    0%{

    transform:translateY(-40px);

    opacity:0;

    }

    100%{

    transform:translateY(0px);

    opacity: 1;

    }

    }