微信小程序单行字体无缝向上滚动
wxml
<swiper class="swiper_container" vertical="true" autoplay="true" circular="true" interval="1000">
<block wx:for="{{msgList}}">
<navigator url="/pages/index/index?title={{item.url}}" open-type="navigate">
<swiper-item>
<view class="swiper_item">{{item.title}}</view>
</swiper-item>
</navigator>
</block>
</swiper>
js
onLoad(e) {
console.log(e.title)
this.setData({
msgList: [
{ url: "url", title: "1小编不易多多关注会持续更新小编不易多多关注会持续更新" },
{ url: "url", title: "2小编不易多多关注会持续更新小编不易多多关注会持续更新" },
{ url: "url", title: "3小编不易多多关注会持续更新小编不易多多关注会持续更新" }]
});
},
wxss
.swiper_container {
background-color: yellow;
height: 50rpx;
width: 68vw;
}
.swiper_item {
font-size: 30rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}