当前位置:网站首页>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>边栏推荐
- 应用实践 | 数仓体系效率全面提升!同程数科基于 Apache Doris 的数据仓库建设
- ThinkPHP kernel work order system source code commercial open source version multi user + multi customer service + SMS + email notification
- Experience of autumn recruitment in 22 years
- 1293_FreeRTOS中xTaskResumeAll()接口的实现分析
- 【GO记录】从零开始GO语言——用GO语言做一个示波器(一)GO语言基础
- 德总理称乌不会获得“北约式”安全保障
- If an exception is thrown in the constructor, the best way is to prevent memory leakage?
- Cancel the down arrow of the default style of select and set the default word of select
- Installation and configuration of sublime Text3
- ABAP ALV LVC模板
猜你喜欢

NVIDIA Jetson测试安装yolox过程记录

基于微信小程序开发的我最在行的小游戏
![[OBS] the official configuration is use_ GPU_ Priority effect is true](/img/df/772028e44776bd667e814989e8b09c.png)
[OBS] the official configuration is use_ GPU_ Priority effect is true

Kubernetes static pod (static POD)
![Cause analysis and solution of too laggy page of [test interview questions]](/img/8d/3ca92ce5f9cdc85d52dbcd826e477d.jpg)
Cause analysis and solution of too laggy page of [test interview questions]

FOFA-攻防挑战记录

Class head up rate detection based on face recognition

C# 泛型及性能比较

How to learn a new technology (programming language)

NVIDIA Jetson test installation yolox process record
随机推荐
QT adds resource files, adds icons for qaction, establishes signal slot functions, and implements
DNS 系列(一):为什么更新了 DNS 记录不生效?
Codeforces Round #804 (Div. 2)(A~D)
Qt不同类之间建立信号槽,并传递参数
韦东山第三期课程内容概要
Qt添加资源文件,为QAction添加图标,建立信号槽函数并实现
ABAP ALV LVC template
赞!idea 如何单窗口打开多个项目?
[C language] objective questions - knowledge points
22年秋招心得
Su embedded training - day4
How to add automatic sorting titles in typora software?
测试流程不完善,又遇到不积极的开发怎么办?
[OBS] the official configuration is use_ GPU_ Priority effect is true
他们齐聚 2022 ECUG Con,只为「中国技术力量」
深潜Kotlin协程(二十二):Flow的处理
Cancel the down arrow of the default style of select and set the default word of select
ABAP ALV LVC模板
letcode43:字符串相乘
Summary of the third course of weidongshan