textalignlast

收藏:0   阅读:33

Style textAlignLast 属性

实例

把段落的最后一行向右对齐:

document.getElementById("myDIV").style.textAlignLast="right";


定义和用法

textAlignLast 属性规定如何对齐文本的最后一行。

注意:textAlignLast 属性只有在 text-align 属性设置为 "justify" 时才起作用。


浏览器支持

Internet Explorer Firefox Opera Google Chrome Safari

只有 Internet Explorer 支持 textAlignLast 属性。

Firefox 支持另一个可替代该属性的属性,即 MozTextAlignLast 属性。

Internet Explorer 不支持 "start" 和 "end" 值。


语法

返回 textAlignLast 属性:

object.style.textAlignLast

设置 textAlignLast 属性:

object.style.textAlignLast="auto|left|right|center|justify|start|end|initial|inherit"

属性值

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

技术细节

默认值: auto
返回值: 字符串,表示元素的 text-align-last 属性。
CSS 版本 CSS3


相关文章

CSS 参考手册:text-align-last 属性

© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!