在DIV中秀出数据的时候
如果数据超过我们原本设定的大小
那么DIV的大小就会被破坏

为了解决这个问题,可以使用style中的overflowtext-overflow来处理
以下是范例与法与结果



Effect of CSS property text-overflow

Each box (DIV element) below contains the following text:

We hold these truths to be self-evident, that all people are created equal.

Note how the STYLE settings effect the rendering of the text


STYLE ='text-overflow : clip; overflow : hidden'
We hold these truths to be self-evident, that all people are created equal.


STYLE ='text-overflow : ellipsis; overflow : hidden'
We hold these truths to be self-evident, that all people are created equal.


STYLE ='text-overflow : ellipsis; overflow : visible'
We hold these truths to be self-evident, that all people are created equal.
posted on 2008-06-14 09:46  topcat  阅读(487)  评论(0编辑  收藏  举报