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

I could­n’t believe a google search did­n’t already turn up the answer for this — it’s crazy that you can­’t just ver­tic­ally-cen­ter the images in a word­press simple image gal­lery. After much faff­ing with 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.

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