不可換行 <NOBR></NOBR> (不換行)

overflow
版本:CSS2  兼容性:IE4+ NS6+ 繼承性:無(wú)

語(yǔ)法:

overflow : visible | auto | hidden | scroll

參數(shù):

visible :  不剪切內(nèi)容也不添加滾動(dòng)條。假如顯式聲明此默認(rèn)值,對(duì)象將被剪切為包含對(duì)象的window或frame的大小。并且clip屬性設(shè)置將失效
auto :  此為body對(duì)象和textarea的默認(rèn)值。在需要時(shí)剪切內(nèi)容并添加滾動(dòng)條
hidden :  不顯示超過(guò)對(duì)象尺寸的內(nèi)容
scroll :  總是顯示滾動(dòng)條

說(shuō)明:

檢索或設(shè)置當(dāng)對(duì)象的內(nèi)容超過(guò)其指定高度及寬度時(shí)如何管理內(nèi)容。
設(shè)置textarea對(duì)象為hidden值將隱藏其滾動(dòng)條。
對(duì)于table來(lái)說(shuō),假如table-layout屬性設(shè)置為fixed,則td對(duì)象支持帶有默認(rèn)值為hidden的overflow屬性。如果設(shè)為hidden,scroll或者auto,那么超出td尺寸的內(nèi)容將被剪切。如果設(shè)為visible,將導(dǎo)致額外的文本溢出到右邊或左邊(視direction屬性設(shè)置而定)的單元格。
自IE5開(kāi)始,此屬性在MAC平臺(tái)上可用。
對(duì)應(yīng)的腳本特性為overflow。
示例:

body { overflow: hidden; }
div { overflow: scroll; height: 100px; width: 100px; }

text-overflow版本:IE6+專有屬性 繼承性:無(wú)


語(yǔ)法:

text-overflow : clip | ellipsis

參數(shù):

clip :  不顯示省略標(biāo)記(...),而是簡(jiǎn)單的裁切
ellipsis :  當(dāng)對(duì)象內(nèi)文本溢出時(shí)顯示省略標(biāo)記(...)

說(shuō)明:

設(shè)置或檢索是否使用一個(gè)省略標(biāo)記(...)標(biāo)示對(duì)象內(nèi)文本的溢出。
對(duì)應(yīng)的腳本特性為textOverflow。請(qǐng)參閱我編寫的其他書目。

示例:

div { text-overflow : clip; }

代碼:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>無(wú)標(biāo)題文檔</title>
</head>
<body>
<table width="100%" border="1" cellspacing="2" cellpadding="2" style="table-layout:fixed">
<tr>
<td width="10%">s</td>
<td><div STYLE="width:60%; overflow:hidden;text-overflow:ellipsis"> <nobr> asdfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdata goes here </nobr></div></td>
<td width="30%">&nbsp;</td>
</tr>
<tr>
<td>d</td>
<td><div STYLE="width:60%; overflow:hidden;text-overflow:ellipsis"> <nobr> asdfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdata goes here </nobr></div></td>
<td>&nbsp;</td>
</tr>
</table>
</body>
</html>
標(biāo)簽:

相關(guān)文章

隨機(jī)推薦