您的位置:首页 > Web前端 > CSS

关于换行的CSS

2006-04-03 16:52 1466 查看
1。使用 WORD-WRAP: break-word样式来进行自适应换行。
例如:
div { word-wrap: break-word; word-break: break-all; }
<xmp style="WORD-WRAP: break-word;word-break: break-all;"></xmp>
其中表格换行
<table style='table-layout:fixed'>

2.禁止输入法,这样就可以限制不能够输入汉字
<input type=text style="ime-mode: disabled ; ">

3.表格单元内容为空时也需要显示边框.
<table border=1 style="border-collapse: collapse; " bordercolor=red>
<tr>
<td>lizongbo</td><td>lizongbo</td>
</tr>
<tr>
<td><!--注意这里内容为空,--></td><td>lizongbo</td>
</tr>
<tr>
<td>lizongbo</td><td>lizongbo</td>
</tr>
</table>
“empty-cells: hide;”这个设置并不能够产生效果,因为ie不支持:
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: