上下滚动的文字跑马灯效果

上下滚动的文字跑马灯效果

html

<view class="index-top-info">
	<view class="index-top-info-list">
		<view class="index-top-info-list-wrap trans">
			<view class="index-top-info-list-wrap-item flex_a_c" v-for="(item, index) in openList" :key="index">
				<image src="/static/image/index/icon1.png" mode=""></image>
				<text class="clamp">{{ item.content }}</text>
			</view>
		</view>
		<view class="index-top-info-list-wrap trans">
			<view class="index-top-info-list-wrap-item flex_a_c" v-for="(item, index) in openList" :key="index">
				<image src="/static/image/index/icon1.png" mode=""></image>
				<text class="clamp">{{ item.content }}</text>
			</view>
		</view>		
	</view>
</view>

data

openList: [
		{
			url: '/static/image/index/swiper.png',
			text: '什么什么游戏'
		},
		{
			url: '/static/image/index/swiper.png',
			text: '什么什么游戏全新'
		},
		{
			url: '/static/image/index/swiper.png',
			text: '什么什么游戏全新下载'
		}
	],//banner数据

css

.index-top{
	&-info{
		height: 120upx;
		overflow: hidden;
		padding: 0 30upx;
		position: relative;
		&-list{
			height: 120upx;
			overflow: hidden;
			&-wrap{
				&-item{
					height: 40upx;
					color: #B6B8BF;
					font-size: 22upx;
					image{
						height: 33upx;
						width: 33upx;
						margin-right: 20upx;
					}
				}
			}
			.trans{
				animation: moveSlideshow 10s linear infinite;
			}
			@keyframes moveSlideshow {
				100% {
					transform: translateY(-100%);
				}
			 }
		}
	}
}

效果图
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值