代碼: <style type="text/css">.移 { display: block; margin: 0px 60px; position: relative; animation: spin 10s linear infinite; animation-delay: 3.5s;/*延遲時間*/ animation-iteration-count:infinite ;/*循環(huán)次數*/ animation-duration: 20s;/*歌詞一個周期的持續(xù)時間*/ } @keyframes spin { -0% { transform: translate(2%,0%)scale(1.0)rotateX(0deg)rotateY(0deg);} 15% { transform: translate(-23%,0%)scale(1.0)rotateX(0deg)rotateY(0deg);} 35% { transform: translate(23%,0%)scale(1.0)rotateX(0deg)rotateY(0deg);} 55% { transform: translate(2%,0%)scale(1.0)rotateX(0deg)rotateY(0deg);} 75% { transform: translate(2%,-23%)scale(1.0)rotateX(0deg)rotateY(0deg);} 95% { transform: translate(2%,23%)scale(1.0)rotateX(0deg)rotateY(0deg);} } </style> <div class="移"> <div style="margin-top:0px; margin-left:0px;">此處文字用播放器代碼替換</div> </div> 說明: 放置播放器位置,修改定位代碼margin-top:0px; margin-left:0px中的0px值,。
|