当前位置:网站首页>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>
边栏推荐
- QT establish signal slots between different classes and transfer parameters
- STL--String类的常用功能复写
- Cause analysis and solution of too laggy page of [test interview questions]
- Solution to the problem of unserialize3 in the advanced web area of the attack and defense world
- 【GO记录】从零开始GO语言——用GO语言做一个示波器(一)GO语言基础
- Deep dive kotlin collaboration (the end of 23): sharedflow and stateflow
- Service Mesh的基本模式
- 德总理称乌不会获得“北约式”安全保障
- Malware detection method based on convolutional neural network
- 手机上炒股安全么?
猜你喜欢
3年经验,面试测试岗20K都拿不到了吗?这么坑?
C# 泛型及性能比较
RPA云电脑,让RPA开箱即用算力无限?
应用实践 | 数仓体系效率全面提升!同程数科基于 Apache Doris 的数据仓库建设
他们齐聚 2022 ECUG Con,只为「中国技术力量」
Tencent security released the white paper on BOT Management | interpreting BOT attacks and exploring ways to protect
新库上线 | CnOpenData中国星级酒店数据
Operating system principle --- summary of interview knowledge points
基于卷积神经网络的恶意软件检测方法
Codeforces Round #804 (Div. 2)(A~D)
随机推荐
Basic mode of service mesh
22年秋招心得
Solution to the problem of unserialize3 in the advanced web area of the attack and defense world
5G NR 系统消息
炒股开户怎么最方便,手机上开户安全吗
Su embedded training - day4
Summary of weidongshan phase II course content
【测试面试题】页面很卡的原因分析及解决方案
Stock account opening is free of charge. Is it safe to open an account on your mobile phone
语义分割模型库segmentation_models_pytorch的详细使用介绍
C# 泛型及性能比较
Analysis of 8 classic C language pointer written test questions
Is it safe to open an account on the official website of Huatai Securities?
1293_ Implementation analysis of xtask resumeall() interface in FreeRTOS
What has happened from server to cloud hosting?
Is it safe to speculate in stocks on mobile phones?
华泰证券官方网站开户安全吗?
DNS 系列(一):为什么更新了 DNS 记录不生效?
After going to ByteDance, I learned that there are so many test engineers with an annual salary of 40W?
LeetCode刷题