Css vertically aligned rows cartridge

Aligned in a plurality of rows in the vertical direction in the cassette

  1. Not aligned to an element (line box) arranged in the vertical direction vertical-align arrangement

    Default: text-top text-bottom middle, the pixel values, the percentage of

Pictures of the bottom white border

  1. Cause: img label inline elements, the default mode is its vertical-align: baseline (baseline alignment). The default picture is the baseline vertical alignment,
    the position of the relevant baseline font, so at some point, the gap at the bottom of the picture may be 2px, and sometimes may be 4px or more.
    Different font-size will cause this gap height size

  2. Pictures of the parent element is a block-box, highly automated block box, the bottom edge of the bottom of the picture and the parent element will always be a blank

           解决办法:1.设置父元素的字体大小为0;[缺点:不能显示div中的文字]

                    2.将图片设置为块盒(display:block)

                    3.给图片加上vertical-align: bottom
Published 20 original articles · won praise 1 · views 49

Guess you like

Origin blog.csdn.net/weixin_43388615/article/details/105086900