あなたは、キーフレームアニメーションの組み合わせを使用してそれを行うことができます。以下の作業コード。
#circle {
display: block;
width: 100px;
height: 100px;
background: red;
border-radius: 50%;
overflow:hidden;
/* Animation to spin and move the sphere */
-webkit-animation: spin 1000ms linear infinite, moveLeftToRight 5s linear infinite;
-moz-animation: spin 1000ms linear infinite, moveLeftToRight 5s linear infinite;
-ms-animation: spin 1000ms linear infinite, moveLeftToRight 5s linear infinite;
animation: spin 1000ms linear infinite, moveLeftToRight 5s linear infinite;
-webkit-transition: all 1s ease;
transition: all 1s ease;
position: absolute;
left: 0;
}
/* Spinning the sphere using key frames */
@keyframes spin {
from { transform: rotate3d(0, 1, 0, 0deg); }
to { transform: rotate3d(0, 1, 0, 180deg); }
}
/* Move sphere from left to right */
@keyframes moveLeftToRight {
0% { left: 0; }
100% { left: 100%; }
}
<div id="circle">
<img src="http://cdn.wallpapersafari.com/15/28/zMTLik.jpg" style="height:100px; width:100px;"/>
</div>
「ロール」の意味を説明できますか? –
以下の回答はほとんど答えられておらず、質問は明らかにされていないので、これを "不明確"として保留するべきだと私は考えます。 – halfer