Home>Article>Daily Programming> How to use css text-align-last attribute
text-align-last attribute definition and usage
In css, text-align-last attribute It is used to specify how to align the last line of text. To use this attribute, the text-align attribute must be set to "justify", otherwise the text-align-last attribute will not work.
Only Internet Explorer supports the text-align-last attribute, but the start and end attribute values are not supported. Firefox browser supports -moz-text-align-last attribute to replace this attribute.
text-align-last attribute syntax format
css syntax: text-align-last: auto/left/right/center/justify/start/end/initial /inherit
JavaScript syntax: object.style.textAlignLast="right"
Attribute value description
auto: Default value, the last line is adjusted , aligned to the left
left: the last line is aligned to the left; right: the last line is aligned to the right
center: the last line is aligned in the center
justify: the last line is adjusted Align both ends
start: The last line is aligned at the beginning of the line (if the text-direction is from left to right, then align to the left; if the text-direction is from right to left, then align to the right)
end: The last line is aligned at the end of the line (if the text-direction is from left to right, align to the right; if the text-direction is from right to left, align to the left)
initial: Set this attribute to its default value
inherit: Inherit the text-align-last attribute value from the parent element
Example
The above is the detailed content of How to use css text-align-last attribute. For more information, please follow other related articles on the PHP Chinese website!