文本最终对齐 | 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 |