﻿
.horizontally {
    height: 50px;
    overflow: hidden;
    position: relative;
    background: yellow;
    color: orange;
    border: 1px solid orange;
}

.horizontally p {
    position: absolute;
    width: 100%;
    height: 100%;
    margin: 0;
    font-size:large;
    line-height: 50px;
    text-align: center;
    /* Starting position */
    -moz-transform: translateX(1%);
    -webkit-transform: translateX(1%);
    transform: translateX(1%);
    /* Apply animation to this element /////////
    -moz-animation: horizontally 15s linear infinite alternate;
    -webkit-animation: horizontally 15s linear infinite alternate;
    animation: horizontally 15s linear infinite alternate;*/
}

/* Move it (define the animation) */
@-moz-keyframes horizontally {
    0% {
        -moz-transform: translateX(50%);
    }

    100% {
        -moz-transform: translateX(-50%);
    }
}

@-webkit-keyframes horizontally {
    0% {
        -webkit-transform: translateX(50%);
    }

    100% {
        -webkit-transform: translateX(-50%);
    }
}

@keyframes horizontally {
    0% {
        -moz-transform: translateX(50%); /* Browser bug fix */
        -webkit-transform: translateX(50%); /* Browser bug fix */
        transform: translateX(50%);
    }

    100% {
        -moz-transform: translateX(-50%); /* Browser bug fix */
        -webkit-transform: translateX(-50%); /* Browser bug fix */
        transform: translateX(-50%);
    }
}
 