Css之中英文左右(两端)对齐
<p>两端对齐</p>
英文对齐:<br>
<div style="font-size:12px;width:300;text-align:justify;text-justify:newspaper">¨Crepower¨ Brand Belts, Chains and other Transmission Parts are manufactured under ISO9001 certified quality-control system. With improved quality material and well-organized production procedures, ¨Crepower¨ power transmission products have noticeably fatigue strength and long-service life.We can supply all types and sizes according to the related standards and customers’ requirements and</div>
<br>
中文对齐:<br>
<div style="font-size:12px;width:300;text-align:justify; text-justify:inter-ideograph">
上周五突然决定去鄱阳湖看鸟了,晚上没票,只好买了周六晚上的,没有拍鸟必用的专业相机与超长焦的镜头,甚至也没有一个望远镜,就匆匆出发了。今天上午九点走出南昌火车站,坐上一辆上中巴到永修县城,再挤进一个小面包,终于在中午到达了这个鄱阳湖畔的小镇——吴城。除了从附近两个城市南昌和九江来的游客,恐怕再没有远地方来的游人了,更别说背包客,到了晚上,竟只剩我一个外地人。在小面包上碰到的三个九江外国语学校的老师,一路同行也仅止于在镇子里匆忙逛一下就回去了。</div>
===================================================================================================
英文对齐:<br>
<div style="font-size:12px;width:300;text-align:justify;text-justify:inter-ideograph">
这里填写很长很长的英文内容……
</div>
<br>
中文对齐:<br>
<div style="font-size:12px;width:300;text-align:justify; text-justify:inter-ideograph">
这里填写很长很长的中文内容……
</div>
***************************************************************************************************************
语法:
text-justify : auto | distribute | distribute-all-lines | distribute-center-last | inter-cluster | inter-ideograph | inter-word | kashida | newspaper
取值:
auto : 默认值。允许浏览器代理用户确定使用的两端对齐法则
distribute : 处理空格很像 newspaper ,适用于东亚文档。尤其是泰文
distribute-all-lines : 两端对齐行的方式与 distribute 相同,也同样不包含两段对齐段落的最后一行。适用于表意字文档
distribute-center-last : 未实现
inter-cluster : 调整文本无词间空格的行。这种模式的调整是用于优化亚洲语言文档的
inter-ideograph : 为表意字文本提供完全两端对齐。他增加或减少表意字和词间的空格
inter-word : 通过增加字之间的空格对齐文本。该行为是对齐所有文本行最快的方法。它的两端对齐行为对段落的最后一行无效
kashida : 通过拉长选定点的字符调整文本。这种调整模式是特别为阿拉伯脚本语言提供的。需要IE5.5+支持
newspaper : 通过增加或减少字或字母之间的空格对齐文本。是用于拉丁文字母表两端对齐的最精确格式
说明:
设置或检索对象内调整文本使用的对齐方式。
因为这个属性影响文本布局,所以 text-align 属性必须被设置为 justify 。
此属性只作用于块对象。
此属性对于 currentStyle 对象而言是只读的。对于其他对象而言是可读写的。
对应的脚本特性为 textJustify 。
示例:
div {text-justify : auto; text-align:justify; }