效果
纯html实现见下载链接
swiper最新版swiper9无缝匀速轮播-纯html实现
https://download.csdn.net/download/gaolong19931208/87635401
vue项目安装依赖
yarn add swiper
使用swiper进行文字轮播-demo
<template>
<div style="width: 4em;margin-left: 50em;margin-top: 20em;">
<swiper-container
:autoplay="true"
autoplay-delay="0"
:speed="500"
:injectStyles="['.swiper-wrapper{transition-timing-function: linear !important;}']"
loop="true"
slides-per-view="4">
<swiper-slide v-for="(item,index) in strarr">
<span style="color: #e13025">{{ item }}</span>
</swiper-slide>
</swiper-container>
</div>
</template>
<script>
import {register} from "swiper/element/bundle";
register();
export default {
name: 'demo',
data() {
return {
strarr: '在12生a态b文明体'.split(''),
};
},
}
</script>