The best CSS text-align-last attribute Tutorial In 2024, In this tutorial you can learn Examples,Browser Support,Definition and Usage,CSS Syntax,Property Value,
The last line of the paragraph is aligned to the right:
Only Internet Explorer supports text-align-last attribute.
Firefox supports another alternative of the property attribute that -moz-text-align-last attribute.
Internet Explorer does not support the "start" and "end" value.
text-align-last attribute specifies how to align the text of the last line.
Note: text-align-last attribute works only when the "justify" the text-align property is set.
Defaults: | auto |
---|---|
inherit: | Yes |
Can be animated: | no. Please refer to animation (Animatable) . |
version: | CSS3 |
JavaScript syntax: | object .style.textAlignLast = "right"to try |
值 | 描述 | 测试 |
---|---|---|
auto | 默认值。最后一行被调整,并向左对齐。 | 测试 » |
left | 最后一行向左对齐。 | 测试 » |
right | 最后一行向右对齐。 | 测试 » |
center | 最后一行居中对齐。 | 测试 » |
justify | 最后一行被调整为两端对齐。 | 测试 » |
start | 最后一行在行开头对齐(如果 text-direction 是从左到右,则向左对齐;如果 text-direction 是从右到左,则向右对齐)。 | 测试 » |
end | 最后一行在行末尾对齐(如果 text-direction 是从左到右,则向右对齐;如果 text-direction 是从右到左,则向左对齐)。 | 测试 » |
initial | 设置该属性为它的默认值。请参阅 initial 。 | 测试 » |
inherit | 从父元素继承该属性。请参阅 inherit 。 |