39

前端实现文字跑马灯的三种方式

 5 years ago
source link: https://juejin.im/post/5bd8581fe51d45088e31bb64
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
前言 最近写了一个文字跑马灯的项目需求,刚开始用js写,能够完成需求。后面想着换种方式(分别是html和css)来实现同一个需求,以减少性能消耗。 首先,需求分析: 需求点1.判断文字的长度和容器的长度,如果文字长度大于容器长度则开始滚动,否则不滚动; 需求点

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK