search
HomeDaily ProgrammingCSS KnowledgeHow to use css text-align-last attribute

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

How to use css text-align-last attribute

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!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use