Join MDN and developers like you at Mozilla's View Source conference, 12-14 September in Berlin, Germany. Learn more at


This article needs a technical review. How you can help.

<div id="rotate">This text will rotate indefinitely</div>
#rotate {
    display: inline-block;
    margin-top: 100px;

    animation-duration: 3s;
    animation-iteration-count: infinite;
    animation-name: rotate;

@keyframes rotate {
    from {
        transform: rotate(0);
    to {
        transform: rotate(360deg);


Document Tags and Contributors

 Contributors to this page: groovecoder, jezdez, teoli, fscholz, kscarfone
 Last updated by: groovecoder,