c***@163.com
c***@163.com
  • 发布:2025-03-25 01:47
  • 更新:2025-03-25 01:47
  • 阅读:38

#插件讨论# 【 好用翻页组件 - 1***@qq.com 】放图片,左右有个边距,怎么调都有,里面做限制了吗,好像也没有看到

分类:uni-app
关联插件: 好用翻页组件

放图片,左右有个边距,怎么调都有,里面做限制了吗,好像也没有看到

<yingbing-flip   
    :data="sharePhotoList"   
    background="url(/static/share_bg_1.jpg) no-repeat center center / contain;"   
    :autoplay="true"   
    :unableClickPage="true"   
    :vertical="false"  
    :duration="1000"  
    style="height: 100vh; width: 100vw;margin: 0;padding: 0;">  
            <!-- #ifndef MP -->  
            <template v-slot="{item, index}">  
            <!-- #endif -->  
            <!-- #ifdef MP -->  
            <template v-for="(item, index) in sharePhotoList" :slot="`wx:${index}`">  
            <!-- #endif -->  
                <view class="view">  
                    <image :src="item.photoUrl" class="photo" mode="widthFix" />  
                     <!-- <view class="overlay"></view> -->  
                </view>  
            </template>  
    </yingbing-flip>

样式

.view {  
        height: 90vh;   
        width: 100vw;  
        display: flex;   
        justify-content: center;   
        align-items: center;  
        padding: 0;  
        margin: 0;  
        position: relative;  
    }  
    .photo {  
        max-width: 100vw;  
        max-height: 100vh;  
        width: 100vw;  
        height: auto;  
        box-shadow: 0 0 20px 5px rgba(99, 87, 26, 0.5); /* 模糊效果 */  
    }
2025-03-25 01:47 负责人:无 分享
已邀请:

要回复问题请先登录注册