<template>
<view>
<view class="tabbar-background">
<view class="scan-background"></view>
</view>
</view>
</template>
<script>
export default {
}
</script>
<style>
.tabbar-background {
/* #ifndef APP-PLUS-NVUE */
display: flex;
box-sizing: border-box;
/* #endif */
flex-direction: row;
justify-content: center;
}
.scan-background {
/* #ifndef APP-PLUS-NVUE */
display: flex;
box-sizing: border-box;
/* #endif */
width: 120rpx;
height: 120rpx;
border-radius: 50%;
box-shadow: 0px -3px 10px 0px rgba(204, 204, 204, 0.5);
}
</style>
以上样式只要改为
.tabbar-background {
/ #ifndef APP-PLUS-NVUE /
display: flex;
box-sizing: border-box;
/ #endif /
flex-direction: row;
justify-content: center;
position: fixed;
bottom: 0;
}
scan-background 就不会居中了
1 个回复
Jack_Hu (作者)
问题出在没有设置宽度,所以没有居中。
问题解决。
看来dcloud的论坛不够活跃啊