当前位置: 首页 > 网络学院 > 网页制作基础教程 > CSS > CSS vertical-align属性
The vertical-align property sets the vertical alignment of an element.
vertical-align 属性可以设置元素的垂直对齐方式
Inherited: No
继承性:无
img |
值 | 描述 |
---|---|
baseline | The element is placed on the baseline of the parent element 将支持 valign 特性的对象的内容与基线对齐 |
sub | Aligns the element as it was subscript 垂直对齐文本的下标 |
super | Aligns the element as it was superscript 垂直对齐文本的上标 |
top | The top of the element is aligned with the top of the tallest element on the line 将支持 valign 特性的对象的内容对象顶端对齐 |
text-top | The top of the element is aligned with the top of the parent element's font 将支持 valign 特性的对象的文本与对象顶端对齐 |
middle | The element is placed in the middle of the parent element 将支持 valign 特性的对象的内容与对象中部对齐 |
bottom | The bottom of the element is aligned with the lowest element on the line 将支持 valign 特性的对象的内容与对象底端对齐 |
text-bottom | The bottom of the element is aligned with the bottom of the parent element's font 将支持 valign 特性的对象的文本与对象顶端对齐 |
length | |
% | Aligns the element in a % value of the "line-height" property. Negative values are allowed 对齐元素在"line-height"值当中。可以使用负数 |