Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

CSS text-align-last property


May 06, 2021 CSS Reference Manual


Table of contents


CSS text-align-last property

CSS text-align-last property CSS reference manual


Align the last line of the paragraph to the right:

p
{
text-align: justify;
text-align-last: right;
-moz-text-align-last: right; } /* 针对 Firefox 的代码 */
}

Try it out . . .

Browser support

CSS text-align-last property CSS text-align-last property CSS text-align-last property CSS text-align-last property CSS text-align-last property

Only Internet Explorer supports the text-align-last property.

Firefox supports another property that replaces this property, the -moz-text-align-last property.

Internet Explorer does not support "start" and "end" values.


Definitions and usages

The text-align-last property specifies how to align the last line of text.

Note: The text-align-last property only works if the text-align property is set to "justify".

Default: auto
Inherited: Is
Animated: Whether. See Animation .
Version: CSS3
JavaScript syntax: object .style.textAlignLast="right" Give it a try


CSS syntax

text-align-last: auto|left|right|center|justify|start|end|initial|inherit;

The property value

描述 测试
auto 默认值。最后一行被调整,并向左对齐。 测试 »
left 最后一行向左对齐。 测试 »
right 最后一行向右对齐。 测试 »
center 最后一行居中对齐。 测试 »
justify 最后一行被调整为两端对齐。 测试 »
start 最后一行在行开头对齐(如果 text-direction 是从左到右,则向左对齐;如果 text-direction 是从右到左,则向右对齐)。 测试 »
end 最后一行在行末尾对齐(如果 text-direction 是从左到右,则向右对齐;如果 text-direction 是从右到左,则向左对齐)。 测试 »
initial 设置该属性为它的默认值。请参阅 initial 测试 »
inherit 从父元素继承该属性。请参阅 inherit

CSS text-align-last property CSS reference manual