Home
Sign Up
Sign In
V2EX
›
问与答
网格中如何使图片居中
xJogger
·
Jun 15, 2021
· 1176 views
This topic created in 1967 days ago, the information mentioned may be changed or developed.
用网格排版之后,如果图片高度不一致,会出现如下的留白情况,如何能让图片在网格中上下居中,并且让文字在网格底部?
图片:
网页代码:
https://gist.github.com/xJogger/2a4e6a930041bbde72b1011d000ea0d7
显示 Gist 代码
居中
图片
网格
留白
2 replies
wdssmq
Jun 16, 2021
1
1
Flex · Bootstrap
https://getbootstrap.com/docs/4.0/utilities/flex/
4.0 + 的 bootstrap 好像有 flex 布局了。
Flex 布局教程:语法篇 - 阮一峰的网络日志
http://www.ruanyifeng.com/blog/2015/07/flex-grammar.html
xJogger
OP
Jun 16, 2021 via Android
2
@
wdssmq
感谢 我试一试
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Privacy
·
Solana
·
4958 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 23ms ·
UTC 07:17
·
PVG 15:17
·
LAX 23:17
·
JFK 02:17
♥ Do have faith in what you're doing.
❯