h1{  "/> h1{  ">
您可以嘗試執行以下程式碼,使用CSS3 來透過關鍵影格向左移動動畫
即時示範
<html> <head> <style type = "text/css"> h1 { -moz-animation-duration: 3s; -webkit-animation-duration: 3s; -moz-animation-name: slidein; -webkit-animation-name: slidein; } @-moz-keyframes slidein { from { margin-left:100%; width:300% } 75% { font-size:300%; margin-left:25%; width:150%; } to { margin-left:0%; width:100%; } } @-webkit-keyframes slidein { from { margin-left:100%; width:300% } 75% { font-size:300%; margin-left:25%; width:150%; } to { margin-left:0%; width:100%; } } </style> </head> <body> <h1>Tutorials Point</h1> <p>This is an example of animation left with an extra keyframe to make text changes.</p> <button onclick = "myFunction()">Reload page</button> <script> function myFunction() { location.reload(); } </script> </body>
以上是使用CSS3透過關鍵影格向左移動動畫的詳細內容。更多資訊請關注PHP中文網其他相關文章!