<!DOCTYPE?html>
<html>
<head>
????<meta?charset="UTF-8">
????<title>Document</title>
????<style>
????????p{text-align:center;font-weight:?bold;
??????????transition:?all?1s?ease?.3s;
??????????animation:play?3s?ease?.3s;
??????????animation-fill-mode:?forwards}
????????@keyframes?play{
????????????0%{transform:?translate(0,0)?rotate(0)}
????????????100%{transform:?translate(200px,300px)?rotate(60deg)}
????????}
????????p:hover{transform:rotate(40deg)}
????
????</style>
</head>
<body>
????<p>你好</p>
</body>
</html>transition不起作用,把a(bǔ)nimation動(dòng)畫去掉,transition動(dòng)畫就有效,怎樣讓兩者都有效。(在chrome下測(cè)試的,不是兼容性問(wèn)題)
添加回答
舉報(bào)
0/150
提交
取消