从零开始-智慧港城修仙

布局

display: flex;
flex-direction: column;
justify-content: center;

//设置两者等值,即可让自己垂直居中
line-height:30px;
height:30px;
//两者都是相对父级视图决定的,上者代表不会根据组内元素定位,下者代表会根据组内元素定位
position: absolute;
position: relative;

<div class="myPassenger-main-list" v-for='(item,index) in passengerData' :key='index'></div>
<div class="myCollection-itemDiv-bottom" v-if ='index!=collectionData.length-1'></div>
//设置网络图片及占位图
<img :src="item.pic.indexOf('http')!=-1?item.pic:placehodleUrl" alt="" class="myCollection-itemDiv-content-left-spotImg">
flex-direction.png

justify-content.png

export 和 export default 的区别https://blog.csdn.net/sleepwalker_1992/article/details/81461543
js 判断字符串中是否包含某个字符串
https://blog.csdn.net/weixin_39228870/article/details/85338098

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

友情链接更多精彩内容