当前位置:网站首页>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>边栏推荐
- 手写一个模拟的ReentrantLock
- Basic principle and usage of dynamic library, -fpic option context
- 炒股开户怎么最方便,手机上开户安全吗
- German prime minister says Ukraine will not receive "NATO style" security guarantee
- STL--String类的常用功能复写
- Kubernetes static pod (static POD)
- After going to ByteDance, I learned that there are so many test engineers with an annual salary of 40W?
- 【愚公系列】2022年7月 Go教学课程 006-自动推导类型和输入输出
- Is Zhou Hongyi, 52, still young?
- RPA云电脑,让RPA开箱即用算力无限?
猜你喜欢

CVE-2022-28346:Django SQL注入漏洞

51与蓝牙模块通讯,51驱动蓝牙APP点灯

DNS series (I): why does the updated DNS record not take effect?

基于卷积神经网络的恶意软件检测方法

Service mesh introduction, istio overview

C# 泛型及性能比较

Analysis of 8 classic C language pointer written test questions

Reentrantlock fair lock source code Chapter 0
![[Yugong series] go teaching course 006 in July 2022 - automatic derivation of types and input and output](/img/79/f5cffe62d5d1e4a69b6143aef561d9.png)
[Yugong series] go teaching course 006 in July 2022 - automatic derivation of types and input and output

Kubernetes static pod (static POD)
随机推荐
爬虫实战(八):爬表情包
What if the testing process is not perfect and the development is not active?
FOFA-攻防挑战记录
新库上线 | 中国记者信息数据
v-for遍历元素样式失效
C# 泛型及性能比较
第一讲:链表中环的入口结点
Codeforces Round #804 (Div. 2)(A~D)
Reptile practice (VIII): reptile expression pack
测试流程不完善,又遇到不积极的开发怎么办?
CVE-2022-28346:Django SQL注入漏洞
接口测试进阶接口脚本使用—apipost(预/后执行脚本)
The standby database has been delayed. Check that the MRP is wait_ for_ Log, apply after restarting MRP_ Log but wait again later_ for_ log
How to learn a new technology (programming language)
ABAP ALV LVC模板
Single machine high concurrency model design
DNS series (I): why does the updated DNS record not take effect?
An error is reported during the process of setting up ADG. Rman-03009 ora-03113
从服务器到云托管,到底经历了什么?
Introduction to paddle - using lenet to realize image classification method I in MNIST