flex布局的效果是啥,为啥会出现下面的情况?

小程序 文章 2020-08-05 14:01 554 0 全屏看文

AI助手支持GPT4.0

flex布局的效果是啥,为啥会出现下面的情况?What is the effect of flex layout, and why does the following situation occur?

flex布局的效果是啥,为啥会出现下面的情况?

wxml:

wxss:

wxss:加入display:flex后


请问display:flex具体啥作用,为什么只加入了这一条就会产生如此大的差距。(以上为全部代码)

Wxml: wxss: wxss: after adding display: flex, what is the specific function of display: flex, and why only adding this item will lead to such a big gap. (all codes above)

回答:

Distance:
height直接220rpx不行?还有你这个写法就很奇怪,了解一下calc height: calc(100% - 20rpx)
愿你归来仍少年:为什么,蓝色代码块设置了高度宽度,却不显示,而添加display:flex就有效果了
愿你归来仍少年:我看了,但我不明白文章的哪句话可以解释这个现象
จุ๊บ:

好好康康 css 关于 flex 布局的就明白了

-EOF-

AI助手支持GPT4.0