数字滚动效果

      <view class="marquee" >
        <view class="content">
          <text>三分钟创建自己的刊物</text>
          <text style="display: inline-block;  5em;"></text>
          <text>三分钟创建自己的刊物</text>
          <text style="display: inline-block;  5em;"></text>
          <text>三分钟创建自己的刊物</text>
          <text style="display: inline-block;  5em;"></text>
        </view>
      </view>

@keyframes scrollX{ 0% { transform: translateX(0); } 100% { transform: translateX(-33.3%); } }
.marquee{
     100%;
    height: 44px;
    line-height: 44px;
    background: #fff;
    border: none;
    display: block;
    margin: 0 auto;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: clip;
    position: relative;
    font-size: 14px;
}
.marquee .content{
    display: inline-block;
    position: relative;
    padding-right: 0px;
    animation: scrollX 5s linear infinite;
    white-space: nowrap;
}

原文地址:https://www.cnblogs.com/jerrypig/p/9020630.html