html:

<view class="marquee">
<view class="content">
<text>{{text}}</text> <text style="display: inline-block; width: 5em;"></text>
<text>{{text}}</text> <text style="display: inline-block; width: 5em;"></text>
<text>{{text}}</text> <text style="display: inline-block; width: 5em;"></text>
</view>
</view>
css:
@keyframes kf-marque-animation{ 0% { transform: translateX(0); } 100% { transform: translateX(-33.3%); } }
.marquee{
width: 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: 28rpx;
}
.marquee .content{
display: inline-block;
position: relative;
padding-right: 0px;
animation: kf-marque-animation 11.3s linear infinite;
white-space: nowrap;
}

小程序使用animation实现跑马灯的更多相关文章

  1. 实现一个微信小程序组件:文字跑马灯效果

    marquee.json { "component": true, "usingComponents": {} } marquee.wxml <!--co ...

  2. WTF小程序之animation

    目录 animation 的几个关键方法 step 方法 export 方法 如何实现 infinate 动画 小程序的 animation 有一套怪异的 API,既不符合 css 的 keyfram ...

  3. 微信小程序--动画animation

    js: list:[], contentflag:false   this.animation = wx.createAnimation({ duration: 500, timingFunction ...

  4. 微信小程序踩坑集合

    1:官方工具:https://mp.weixin.qq.com/debug/w ... tml?t=1476434678461 2:简易教程:https://mp.weixin.qq.com/debu ...

  5. 微信小程序animation有趣的自定义动画

    这几天在看代码时遇到了一些问题:关于微信小程序的animation自定义动画自己没有系统的学习过 做动画需要我们将一个复杂的动作过程,拆解为一步一步的小节过程 微信中已经为我们写好了端口我们只需要实例 ...

  6. 小程序 大转盘 抽奖 canvas animation

    项目需求运用到大转盘 可设置概率 可直接自定义结果 效果如下

  7. 迅雷首席架构师刘智聪:微信小程序的架构与系统设计的几点观感

    笔者注:本文来自于迅雷首席工程师刘智聪的个人分享,他毕业于南昌大学化学系,加入迅雷后设计开发了多款迅雷核心产品,凭借“大规模网络流媒体服务关键支撑技术”项目获得2015年国家科学技术进步奖二等奖,同时 ...

  8. 微信小程序初体验(上)

    版权声明:本文由练小习原创文章,转载请注明出处: 文章原文链接:https://www.qcloud.com/community/article/204 来源:腾云阁 https://www.qclo ...

  9. 从前端界面开发谈微信小程序体验

    本文由云+社区发表 作者介绍:练小习,2011年加入搜狐,负责搜狐相册的产品策划与前端开发.2015年后加入腾讯 ISUX (社交用户体验设计部),目前主要负责腾讯云的UI开发工作,专注于人机交互,有 ...

随机推荐

  1. 在Mac上安装office2016(破解版)

    doffice2016下载地址: 链接:https://pan.baidu.com/s/1V6I_QQiK2VK1rf0v4aVk5g  密码:3ijf 执行破解程序: 链接:https://pan. ...

  2. 卡方分布(Chi-Square Distribution):

    定义:如果我们的随机变量是标准正态分布(详见以前博客的高斯分布),那么多个随机变量的平方和服从的分布即为卡方分布. X=Y12+Y22+⋯+Yn2 其中,Y1,Y2,⋯,Yn均为服从标准正态分布的随机 ...

  3. linux 查找指定进程并kill

    ps -ef | grep  php | grep -v 'grep' | awk '{print $2}'| xargs kill -9

  4. cocos2dx 实现gpu instancing

    所有的gpu instancing都是在unity3d上实现的,ue4实现起来应该压力也不大相关链接见下:https://www.cnblogs.com/hont/p/7143626.htmlhttp ...

  5. Python实现简单的四则运算

    GitHub 项目地址 https://github.com/745421831/-/tree/master PSP PSP2.1 Personal Software Process Stages 预 ...

  6. INSERT INTO SELECT

    今天遇到一个问题在写把查询的数据添加到一个表里时出现问题 sql  INSERT INTO db1_name(field1,field2) VALUES SELECT field1,field2 FR ...

  7. Java并发编程阅读笔记-同步容器、工具类整理

  8. 一个简单的Quartz定时任务

    package com.shuadan.quartz; import org.springframework.scheduling.annotation.Scheduled; import org.s ...

  9. cocso引擎整体流程

    任何程序都有入口,mian.cpp; Cocos2d也不免俗,在win32平台下,有一个mian.cpp 入口,从这里进入cocos的世界. #ifndef __MAIN_H__ #define __ ...

  10. 小程序 web-view 嵌套的网页跳转到小程序内部页面 实现无缝连接

    需要在H5页面被作出判断和处理  点击事件发生时跳转到小程序内部页面 1.引入小程序提供的JS <script type="text/javascript" src=&quo ...