css Animation 动画-右进左出

复制代码
transform: rotate(旋转) | scale(缩放) | skew(倾斜) | translate(移动) ;
html 复制代码
<style>
.jinggao {
      width: 60vw;

      display: inline-block;
      text-align: center;
      overflow: hidden;
      box-sizing: border-box;
    }
    @keyframes Animation {
      0% {
        /* 右边 */
        transform: translateX(40vw);
      }
      100% {
        /* 左边 */
        transform: translateX(-40vw);
      }
    }
    .text {
      display: inline-block;
      color: #3379b7;
      font-size: 18px;

      animation: Animation 12s linear infinite;
    }
    .text:hover {
      animation-play-state: paused;
      cursor: pointer;
    }
</style> 
html 复制代码
<div>
      <div class="jinggao">
        <span class="text">右进左出</span>
      </div>
    </div>
相关推荐
IT_陈寒6 分钟前
Vue的响应式让我熬到凌晨三点,原来漏了这个小细节
前端·人工智能·后端
Blanche150017 分钟前
利用 RAG 为答疑机器人扩展知识范围
前端
天若有情67322 分钟前
【纯前端小工具】公历生日转农历,批量查询每年农历生日对应的公历日期(GitHub Pages在线直接用)
前端·javascript·github pages·农历转换·lunisolar·网页小工具
SoonITer23 分钟前
怎样构建一个 Agent-friendly 的网站
前端·agent
颜进强39 分钟前
01 · NestJS 是什么:用途、解决什么问题、与热门框架对比
前端·后端·ai编程
wendZzoo42 分钟前
前端工程师的 3D 第一课:一个模型如何进入网页
前端
颜进强1 小时前
04 · NestJS 依赖注入:你在 `@Module` 写的 providers,和构造参数里那个类型,是怎么"对上"的?
前端·后端·ai编程
肆仲冬1 小时前
不用框架,用 TypeScript 从零搭一个 Agent 框架
前端
林语琛1 小时前
我写的 switch…break 被 Babel 偷偷吞了
前端·javascript·babel
烈风逍遥1 小时前
第六篇:RAG 知识库构建与检索全链路
前端·人工智能·后端