小程序,手持弹幕,输入文字之后,弹幕从右往左匀速划过,再次循环。
实现这个功能,首先建一个uniapp项目,建一个vue页面
<template>
<view class="danmu_bg">
<view class="barrage-box" @click="hideBottom">
<view class="text">{
{barrage}}</view>
</view>
<view class="bottmm_barrage_send" v-if="!isLocked">
<view class="unlock" @click="lock">
<image :src="unlockImgSrc" mode=""></image>
</view>
<view class="barrage_input">
<input type="text" placeholder="哈喽!" @input="changeBarrageText" v