<!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不起作用,把animation動畫去掉,transition動畫就有效,怎樣讓兩者都有效。(在chrome下測試的,不是兼容性問題)
添加回答
舉報
0/150
提交
取消