uniapp v-html跑马灯


        <!--跑马灯-->
<view class="home-notice">
<view class="game-notice-icon-box">
<image class="game-notice-icon" src="/static/game-notice.png" mode="widthFix"></image>
</view>
<!-- <uni-notice-bar single="true" :speed="20" :scrollable="true" :text="marqueeListText" class="game-notice-box" color="#a6b2c7" background-color="transparent"></uni-notice-bar>-->
<view class="notice-box">
<view class="_notice">
<swiper class="_swiper tc" @change="slideChange" indicator-dots="false" autoplay="true" :interval="2000" :circular="true" display-multiple-items="1" :duration="18000" :acceleration="true" easing-function="linear">
<swiper-item class="swiper-item2 uni-bg-red" v-for="(item, index) in marqueeList" :key="index" >
{{item.id}}:<view class="swiper-content" v-html="item.content"></view>
</swiper-item>
</swiper>
</view>
</view>
</view>

.home-notice {
margin: 30rpx 30rpx 10rpx 30rpx;
height: 60rpx;
background-color:#fff;
border-radius:10rpx;
display: flex;
align-items: center;
justify-content: center;
position: relative;
box-shadow: 0 0 18rpx #ccc;
overflow: hidden;
.game-notice-icon-box{
display: flex;
align-items: center;
justify-content: center;
height: 100%;
width: 70rpx;
background: #FFEEEF;
}
.game-notice-icon{
width: 32rpx;
height: 27rpx;
}
}}
.notice-box{
position: relative;
width: calc(100% - 70rpx);
._notice {
position: absolute;
left:0;
top: -20rpx;
min-width: calc(750rpx * 2);
box-sizing: border-box;
.swiper-item2{
position: absolute;
left:0;
top: 0;
min-width: 750rpx;
}
}
.swiper-content{
display: inline-block;
}
}


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM