---
title: "css 文字两端对齐 "
author: "cms163"
date: "2011-06-27T13:20:57Z"
tags: []
categories: ["Web前端"]
slug: "css"
draft: false
lastmod: "2011-06-27T13:20:57Z"
id: 1106293
url: "https://cms163.iteye.com/blog/1106293"
---

以前在设计网页的时候后,遇到这样的问题(如左图),每一段最边上的文字就是不能对齐,左对齐,右对齐,两端对齐都不能解决.

今天查看了相关资料后,得出了一种解决方法:  
用CSS来做.代码如下  
&lt;div style="font-size:12px;width:300;text-align:justify;text-justify:inter-ideograph"&gt;加整段文字&lt;/div&gt;

得到排列很整齐的效果.