当前位置:网站首页>Invalid V-for traversal element style
Invalid V-for traversal element style
2022-07-08 00:50:00 【Small white eye】
To realize the effect layout :
For multiple boxes side by side , It's usually used flex Layout ,css as follows :
.friends {
display: flex;
justify-content: space-between;
padding-top: 3.41rem;
padding-left: 0.73rem;
width: 6.1rem;
.item {
overflow-x: scroll;
.photo {
width: 1.2rem;
height: 1.2rem;
}
.name {
width: 1.13rem;
height: 0.39rem;
}
}
}
The key is who to set display:flex !!
Structural error : to v-for Add style to the box on that floor
<div>
<div
class="friends"
v-for="(item,index) of friends"
:key="index"
>
<div class="item">
<div
v-image.normal="item.photo"
class="photo"
/>
<div class="name">
{
{ item.name }}
</div>
</div>
</div>
</div>
Correct writing of structure : stay v-for The outer layer is covered with a box to set the style
<div class="friends">
<div
v-for="(item,index) of friends"
:key="index"
>
<div class="item">
<div
v-image.normal="item.photo"
class="photo"
/>
<div class="name">
{
{ item.name }}
</div>
</div>
</div>
</div>
边栏推荐
- Basic mode of service mesh
- Is it safe to speculate in stocks on mobile phones?
- 51 communicates with the Bluetooth module, and 51 drives the Bluetooth app to light up
- Stock account opening is free of charge. Is it safe to open an account on your mobile phone
- 动态库基本原理和使用方法,-fPIC 选项的来龙去脉
- paddle一个由三个卷积层组成的网络完成cifar10数据集的图像分类任务
- The underlying principles and templates of new and delete
- Installation and configuration of sublime Text3
- jemter分布式
- Play sonar
猜你喜欢
【obs】官方是配置USE_GPU_PRIORITY 效果为TRUE的
5g NR system messages
Play sonar
How to learn a new technology (programming language)
Course of causality, taught by Jonas Peters, University of Copenhagen
Qt添加资源文件,为QAction添加图标,建立信号槽函数并实现
Single machine high concurrency model design
Application practice | the efficiency of the data warehouse system has been comprehensively improved! Data warehouse construction based on Apache Doris in Tongcheng digital Department
Semantic segmentation model base segmentation_ models_ Detailed introduction to pytorch
取消select的默认样式的向下箭头和设置select默认字样
随机推荐
应用实践 | 数仓体系效率全面提升!同程数科基于 Apache Doris 的数据仓库建设
The weight of the product page of the second level classification is low. What if it is not included?
Hotel
Vscode software
STL--String类的常用功能复写
牛客基础语法必刷100题之基本类型
Qt添加资源文件,为QAction添加图标,建立信号槽函数并实现
[OBS] the official configuration is use_ GPU_ Priority effect is true
备库一直有延迟,查看mrp为wait_for_log,重启mrp后为apply_log但过一会又wait_for_log
攻防世界Web进阶区unserialize3题解
大二级分类产品页权重低,不收录怎么办?
韦东山第三期课程内容概要
Application practice | the efficiency of the data warehouse system has been comprehensively improved! Data warehouse construction based on Apache Doris in Tongcheng digital Department
paddle一个由三个卷积层组成的网络完成cifar10数据集的图像分类任务
[Yugong series] go teaching course 006 in July 2022 - automatic derivation of types and input and output
Summary of the third course of weidongshan
Play sonar
[C language] objective questions - knowledge points
搭建ADG过程中复制报错 RMAN-03009 ORA-03113
Stock account opening is free of charge. Is it safe to open an account on your mobile phone