We would like to know how to moving text from right to left with animation.
<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
.wrapper {<!--from w ww. ja v a 2s . co m-->
max-width: 400px;
background: green;
height: 40px;
text-align: right;
}
.marquee {
background: red;
white-space: nowrap;
-webkit-animation: rightThenLeft 4s linear;
}
</style>
</head>
<body>
<div class="wrapper">
<marquee behavior="alternate">
<span class="marquee">This is a marquee!</span>
</marquee>
</div>
</body>
</html>
The code above is rendered as follows: