打印

有关 Div CSS 自动换行问题

css的自动换行 :
对于div

1.(IE浏览器)white-space:normal; word-break:break-all;这里前者是遵循标准。


#wrap{white-space:normal; width:200px; }
或者
#wrap{word-break:break-all;width:200px;}

eg.
<div id="wrap">ddd1111111111111111111111111111111111</div>


效果:可以实现换行
2.(Firefox浏览器)white-space:normal; word-break:break-all;overflow:hidden;同样的FF下也没有很好的实现方法,只能隐藏或者加滚动条,当然不加滚动条效果更好!


#wrap{white-space:normal; width:200px; overflow:auto;}
或者
#wrap{word-break:break-all;width:200px; overflow:auto; }

eg.

<div id="wrap">ddd1111111111111111111111111111111111111111</div>

效果:容器正常,内容隐藏

上面在 在经典也好 网络也 都是这样写

英文 中文  数字  都可以 自动换行   为有 按下一排“.......................”当超出原来设定的
宽度时就会出轨 导致整个页面变样
不知道 上面写的 在IE中是否 有人同样碰过

may i can
Mhm...do not understand what you mean...Oh, and welcome to our forum ...

The white-space property specifies what should be done by the browser with extraneous whitespace (tabs, returns, extra spaces and so on). With the white-space property, you can specify how the browser handles whitespace characters, whether it ignores them or maintains them when the affected element is drawn.

The white-space property can only be applied to block elements.

The white-space property can take one of the following keyword values: normal, pre, and nowrap.

A white-space of normal means that whitespace will be handled in the way it was traditionally handles by browsers. Any tabs, returns and extraneous spacing will be ignored.

Word-break, this property controls the line breaking behavior within words. It is especially useful in cases where multiple languages are used within an element. And the break-all is useful where content contains a majority of Asian character set content, to which this value behaves like 'normal'. Non-Asian character set content may be arbitrarily broken across lines.

Sooooooooo...with this said. What are you trying to do ? What problem do you have. Try and explain yet again, please. i do not understand what your problem is, sorry.

Patric.
谁可以帮忙翻译下  谢谢  用软件翻译 有时候跟本 没能表达出 本意来
我困死了  明天早上还要8点多去来工作   寒  睡觉先  
清醒的时候时候 有空再慢慢查了
may i can
IE中可以解决
Firefox中没门
我如果能翻译出来就好了,我就去当翻译算了,现在的翻译工资很高的
222.243.146.200
丢嘛,快残废了

TOP

还在为头像烦恼?还在为不能关注好友动态烦忧?快来蓝色理想家园吧!
可以参考我以前的帖子:
http://bbs.blueidea.com/viewthread.php?tid=2483168
LOST - FRINGE

TOP

十字花下在上个帖子中说
引用:
IE中可以解决
Firefox中没门
那到未必   不过  就算我输入多少 也只是显示一行而已  汗  自己
不过 我 没 了解 css中他是如何写的
may i can

TOP