直译,就是垂直居中。
通常,应用于行内元素,图片、文字、图标等。vertical-align属性,我的理解就是相对于某个元素对比而言的。
w3c有一段相关信息如下:
Value: | baseline | sub | super | top | text-top | middle | bottom | text-bottom | <percentage> | <length> | inherit |
Initial: | baseline |
Applies to: | inline-level and ‘table-cell’ elements |
Inherited: | no |
Percentages: | refer to the ‘line-height’ of the element itself |
Media: | visual |
Computed value: | for <percentage> and <length> the absolute length, otherwise as specified |
可应用范围可以理解为,在行内和表格内的元素。
图片,按钮,文字和单元格 都可以使用vertical-align属性。