text-overflow
一直available as of IE6,所以你並不需要使用Microsoft供應商前綴。不過,您可能需要Opera和Webkit的擴展,具體取決於您的網站計劃支持的內容。
您正在測試此版本的Internet Explorer的哪個版本?
很明顯,您可以很容易地使用jQuery plugin來實現同樣的功能,但如果IE是您唯一的問題,則應該不需要,因爲如前所述,它應該支持該功能。
下面是一個簡單的代碼複製,應該工作使用此功能:
<!DOCTYPE html>
<html>
<head>
<title>text-overflow: ellipsis</title>
<style type="text/css">
.ellipsis {
height: 1.2em;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 150px;
}
</style>
</head>
<body>
<div class="ellipsis">
This is a test of the less-than-emergency
broadcast system. This is only a test.
</div>
</body>
</html>
你試過'-ms-text-overflow:ellipsis;'? – 2012-02-10 03:23:23
文本溢出在IE6中可用,因此您不需要使用Microsoft供應商前綴。 – tobint 2012-02-10 09:43:07