放图片,左右有个边距,怎么调都有,里面做限制了吗,好像也没有看到
<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); /* 模糊效果 */
}
0 个回复