当前位置:网站首页>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>
边栏推荐
- 丸子官网小程序配置教程来了(附详细步骤)
- Hotel
- 1293_FreeRTOS中xTaskResumeAll()接口的实现分析
- How can CSDN indent the first line of a paragraph by 2 characters?
- Codeforces Round #804 (Div. 2)(A~D)
- Development of a horse tourism website (realization of login, registration and exit function)
- 玩轉Sonar
- v-for遍历元素样式失效
- Jouer sonar
- ThinkPHP kernel work order system source code commercial open source version multi user + multi customer service + SMS + email notification
猜你喜欢
从服务器到云托管,到底经历了什么?
【测试面试题】页面很卡的原因分析及解决方案
Class head up rate detection based on face recognition
Play sonar
They gathered at the 2022 ecug con just for "China's technological power"
【obs】官方是配置USE_GPU_PRIORITY 效果为TRUE的
Development of a horse tourism website (realization of login, registration and exit function)
他们齐聚 2022 ECUG Con,只为「中国技术力量」
基于卷积神经网络的恶意软件检测方法
3 years of experience, can't you get 20K for the interview and test post? Such a hole?
随机推荐
【愚公系列】2022年7月 Go教学课程 006-自动推导类型和输入输出
The underlying principles and templates of new and delete
51与蓝牙模块通讯,51驱动蓝牙APP点灯
My best game based on wechat applet development
paddle入门-使用LeNet在MNIST实现图像分类方法一
去了字节跳动,才知道年薪 40w 的测试工程师有这么多?
接口测试要测试什么?
They gathered at the 2022 ecug con just for "China's technological power"
5g NR system messages
Is it safe to open an account on the official website of Huatai Securities?
Basic types of 100 questions for basic grammar of Niuke
How to insert highlighted code blocks in WPS and word
3 years of experience, can't you get 20K for the interview and test post? Such a hole?
[Yugong series] go teaching course 006 in July 2022 - automatic derivation of types and input and output
5G NR 系统消息
Cve-2022-28346: Django SQL injection vulnerability
DNS series (I): why does the updated DNS record not take effect?
paddle一个由三个卷积层组成的网络完成cifar10数据集的图像分类任务
Su embedded training - day4
Kubernetes Static Pod (静态Pod)