请选择 进入手机版 | 继续访问电脑版
收藏本站腾讯微博新浪微博
点点网模板设计大赛 phpchina

经典论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

蓝色理想 最新研发动态 用悬赏 三天解决问题 解决访问速度慢 论坛支持农历生日 - 给官方提建议

论坛活动及任务 归纳网站最新活动 地图任务 邮件更新任务:保护帐号安全

积分换实物,来参加蓝色理想积分兑换吧! 联系招聘客服 蓝色理想帮你找工作! 万元奖励等你拿——点点网模板设计大赛

查看: 2775|回复: 5

有关 Div CSS 自动换行问题 [复制链接]

lootlater 楼主
帖子
56
体力
181
威望
0
发表于 2006-6-17 04:10:00 |显示全部楼层
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
西部数码顶级域名注册商39元抢注!
lootlater 楼主
帖子
56
体力
181
威望
0
发表于 2006-6-17 04:13:00 |显示全部楼层
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
租服务器,上51IDC | [长沙]招聘:PHP经理10K/WEB前端6K/PHP开发6K

使用道具 举报

花匠

高级会员 手机认证 

帖子
570
体力
894
威望
4
居住地
北京市 昌平区
发表于 2006-6-17 11:38:00 |显示全部楼层
IE中可以解决
Firefox中没门

使用道具 举报

银牌会员 手机认证 

帖子
2541
体力
2035
威望
3
发表于 2006-6-17 16:37:00 |显示全部楼层
我如果能翻译出来就好了,我就去当翻译算了,现在的翻译工资很高的

使用道具 举报

蓝色怪兽

荣誉管理

帖子
4347
体力
14380
威望
69
居住地
香港特别行政区 湾仔区
发表于 2006-6-17 21:28:00 |显示全部楼层
可以参考我以前的帖子:
http://bbs.blueidea.com/viewthread.php?tid=2483168

使用道具 举报

lootlater 楼主
帖子
56
体力
181
威望
0
发表于 2006-6-18 00:11:00 |显示全部楼层
十字花下在上个帖子中说
IE中可以解决
Firefox中没门



那到未必   不过  就算我输入多少 也只是显示一行而已  汗  自己
不过 我 没 了解 css中他是如何写的
may i can

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

Archiver|手机版|安久科技提供CDN|blueidea.com ( 京ICP备05002321号 )  

GMT+8, 2012-2-13 11:11 , Processed in 0.101913 second(s), 10 queries , Gzip On, Memcache On.

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部