小程序使用animation实现跑马灯
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实现跑马灯的更多相关文章
- 实现一个微信小程序组件:文字跑马灯效果
marquee.json { "component": true, "usingComponents": {} } marquee.wxml <!--co ...
- WTF小程序之animation
目录 animation 的几个关键方法 step 方法 export 方法 如何实现 infinate 动画 小程序的 animation 有一套怪异的 API,既不符合 css 的 keyfram ...
- 微信小程序--动画animation
js: list:[], contentflag:false this.animation = wx.createAnimation({ duration: 500, timingFunction ...
- 微信小程序踩坑集合
1:官方工具:https://mp.weixin.qq.com/debug/w ... tml?t=1476434678461 2:简易教程:https://mp.weixin.qq.com/debu ...
- 微信小程序animation有趣的自定义动画
这几天在看代码时遇到了一些问题:关于微信小程序的animation自定义动画自己没有系统的学习过 做动画需要我们将一个复杂的动作过程,拆解为一步一步的小节过程 微信中已经为我们写好了端口我们只需要实例 ...
- 小程序 大转盘 抽奖 canvas animation
项目需求运用到大转盘 可设置概率 可直接自定义结果 效果如下
- 迅雷首席架构师刘智聪:微信小程序的架构与系统设计的几点观感
笔者注:本文来自于迅雷首席工程师刘智聪的个人分享,他毕业于南昌大学化学系,加入迅雷后设计开发了多款迅雷核心产品,凭借“大规模网络流媒体服务关键支撑技术”项目获得2015年国家科学技术进步奖二等奖,同时 ...
- 微信小程序初体验(上)
版权声明:本文由练小习原创文章,转载请注明出处: 文章原文链接:https://www.qcloud.com/community/article/204 来源:腾云阁 https://www.qclo ...
- 从前端界面开发谈微信小程序体验
本文由云+社区发表 作者介绍:练小习,2011年加入搜狐,负责搜狐相册的产品策划与前端开发.2015年后加入腾讯 ISUX (社交用户体验设计部),目前主要负责腾讯云的UI开发工作,专注于人机交互,有 ...
随机推荐
- 小程序中通过判断id来删除数据,当数据长度为0时,显示隐藏部分(交流QQ群:604788754)
欢迎加入小程序交流群:本群定期更新在工作种遇到的小知识(交流QQ群:604788754) WXML: <!--遍历循环的数据部分--> <block wx:for="{{d ...
- 小白的python之路11/14
视频69 固定命令的方式 1 vim /etc/profile 2 vim /etc/bashrc 3 vim /root/.bashrc 4 vim /root/.bash_profile 5 cd ...
- JavaScript超酷时钟的制作
<!DOCTYPE html PUBLIC "-//W3C//h2D XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- mvc控制器
控制器 using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.We ...
- Python2.X和Python3.X中Tkinter模块的文件对话框、下拉列表的不同
Python2.X和Python3.X文件对话框.下拉列表的不同 今天初次使用Python Tkinter来做了个简单的记事本程序.发现Python2.x和Python3.x的Tkinter模块的好多 ...
- C# [Win32] [API] Layered Windows
static void* WndProc(void* hwnd, uint uMsg, void* wParam, void* lParam) { switch (uMsg) { case WM_PA ...
- python 常用网站
https://www.tutorialgateway.org/python-tutorial/
- cocoapod终端配置
- iis7 设置http 自动跳转到https
https://www.cnblogs.com/wxbug/p/7054972.html
- BUAAOO第二单元总结之电梯问题
---恢复内容开始--- Homework1 傻瓜电梯 程序架构 第一次题目非常简单,思考也非常简单,一部电梯傻瓜调度.将命令入公共的队列,电梯从公共队列中取命令即可,其中只需要使用ArrayBloc ...