css - The vertical effect of flex layout cannot be achieved?
为情所困
为情所困 2017-05-16 13:44:11
0
3
568

Referring to the example of teacher Ruan Yifeng, why does the vertical effect not work when you do it yourself??

为情所困
为情所困

reply all(3)
習慣沉默

This thing. . You first need to have a high box. . .

His current height is stretched by the child elements, so there will be no difference between flex-star and flex-end. .

小葫芦

The outer container must be high.

左手右手慢动作

I also read Teacher Ruan’s flex layout, and I think it can be viewed as a document. There are too many attributes, and in the end I only remembered these two. The commonly used vertical centering can be achieved.
My understanding is that
justify-content: center; is equivalent to horizontal centering
align-items: center; is equivalent to vertical centering
Please correct me if I’m wrong

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!