<style> @-webkit-keyframes move { 0% { width: 100px; } 100% { width: 500px; } } .box { width: 100px; height: 100px; background: red; -webkit-animation: 2s move;} </style> <body> <div class="box"> </div> </body>
<style> @-webkit-keyframes move { 50% { width: 500px; } } .box { width: 100px; height: 100px; background: red; -webkit-animation: 2s move ease infinite;} </style> <body> <div class="box"> </div> </body>
<style> @-webkit-keyframes move { 0% { width: 100px; } 100% { width: 500px; } } .box { height: 100px; background: red; } .move { -webkit-animation: 2s move; width: 500px;} </style> <body> <div class="box move"> </div> </body>
<style> @-webkit-keyframes move { 0% { left: 0; } 100% { left: -500px; } } #wrap {width: 500px; height: 100px; border: 1px solid #000; position: relative; margin: 100px auto; overflow: hidden;} #list {position: absolute; left: 0; top: 0; margin: 0; padding: 0; width: 200%; -webkit-animation: 3s move infinite linear;} #list li {list-style: none; float: left; width: 98px; height: 98px; border: 1px solid #FFF; background: #000; color: #FFF; font-size: 98px; text-align: center;} #wrap:hover #list {-webkit-animation-play-state: paused;} </style><body> <div id="wrap"> <ul id="list"> <li>1</li> <li>2</li> <li>3</li> <li>4</li> <li>5</li> <li>1</li> <li>2</li> <li>3</li> <li>4</li> <li>5</li> </ul> </div> </body>