【技巧】使td內容不換行不撐開

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
>
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<style type="text/css">
table
{width:200px;table-layout:fixed;}
td
{white-space:nowrap;overflow:hidden;word-break:keep-all;}
</style>
<table border="1">
 
<tr>
   
<td style="width:50px;">測試測試測試測試測試測試測試測試測試測試</td>
   
<td>測試測試測試測試測試測試測試測試測試測試測試測試</td>
 
</tr>
 
<tr>
   
<td>測試測試測試測試測試測試測試測試測試測試測試</td>
   
<td>測試測試測試測試測試測試測試測試測試測試測試</td>
 
</tr>
</table>
</body>
</html>


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章