0WordPress的标志在默认的 wordpress 库中垂直居中图像

我简直不敢相信谷歌搜索还没有找到答案——你不能在 wordpress 简单图片库中垂直居中图像,这太疯狂了. 经过一番折腾 CSS 我找到了一个简单的答案

By default word­press image gal­lerys are giv­en a class ‘gal­lery’ and all that was needed was to apply some flexbox CSS to this gal­lery. For older browsers that don’t sup­port flexbox they will just fall back to the non ver­tic­ally centered gal­lery which isn’t the end of the world.

就是这样! It works with cap­tions both on and off and does­n’t care how many columns or rows there are in your gallery.

请通过下面的评论给我们你的想法! 如果您想订阅,请使用菜单上的订阅链接右上方. 您还可以通过使用下面的链接社会分享这与你的朋友. 干杯.