文本最終對齊 | text-align-last (Text) - CSS 中文開發手冊css
該text-align-lastCSS屬性描述了一個塊或行的最後一行,強制斷行前右側對齊。html
/* Keyword values */ text-align-last: auto; text-align-last: start; text-align-last: end; text-align-last: left; text-align-last: right; text-align-last: center; text-align-last: justify; /* Global values */ text-align-last: inherit; text-align-last: initial; text-align-last: unset;
Initial value瀏覽器 |
autoide |
---|---|
Applies toorm |
block containershtm |
Inheritedci |
yes開發 |
Mediaget |
visualit |
Computed value |
as specified |
Animation type |
discrete |
Canonical order |
the unique non-ambiguous order defined by the formal grammar |
auto——受影響的行按每一個text-align的值對齊(除非text-align的值是justify,在這種狀況下,效果與設置text-align-last爲start相同)。
start——若是方向是從左到右,效果與left相同,若是方向是從右到左,效果與right相同。
end——若是方向是從左到右,效果與right相同,若是方向是從右到左,效果與left相同。
left——內聯內容與行框的左邊緣對齊。
right——內聯內容與行框的右邊緣對齊。
center——內聯內容在行框中居中。
justify——文字對齊。文本以必定間距排列並保證左右邊緣與段落內容的左右邊緣對齊。
auto | start | end | left | right | center | justify
p { font-size: 1.4em; text-align: justify; -moz-text-align-last: center; text-align-last: center; }
Specification |
Status |
Comment |
---|---|---|
CSS Text Module Level 3The definition of 'text-align-last' in that specification. |
Working Draft |
Initial definition |
Feature |
Chrome |
Edge |
Firefox |
Internet Explorer |
Opera |
Safari |
---|---|---|---|---|---|---|
Basic Support |
35.0 — 47.01 47.0 |
(Yes) |
12.0 — 53.0 -moz- 49.0 |
No |
(Yes) |
No2 |
Feature |
Android |
Chrome for Android |
Edge mobile |
Firefox for Android |
IE mobile |
Opera Android |
iOS Safari |
---|---|---|---|---|---|---|---|
Basic Support |
No |
35.0 — 47.01 47.0 |
(Yes) |
12.0 — 53.0 -moz- 49.0 |
No |
(Yes) |
No2 |