خصائص text-overflow في CSS

Definition and Usage

The text-overflow property specifies what happens when text overflows the containing element.

See also:

CSS3 Tutorial:أثر النص في CSS3

HTML DOM Reference Manual:textOverflow Property

Example

Use the text-overflow property:

div.test
{
text-overflow:ellipsis;
}

Try it yourself

More examples at the bottom of the page.

CSS Syntax

text-overflow: clip|ellipsis|string;

Attribute Value

Value Description Test
clip Truncate text. Test
ellipsis Show an ellipsis to represent the truncated text. Test
string Use the given string to represent the truncated text.

Technical Details

Default Value: clip
Inheritance: no
Version: CSS3
JavaScript Syntax: object.style.textOverflow="ellipsis"

مزيد من الأمثلة

Text-overflow مع تأثير hover
هذا المثال يوضح كيفية عرض النص الكامل عند تحرك المؤشر إلى العنصر.

دعم المتصفح

الرقم في الجدول يوضح إصدار المتصفح الذي يدعم الخاصية بشكل كامل.

الرقم مع -o- يشير إلى إصدار الأولي الذي يستخدم المقدمة.

Chrome IE / Edge Firefox Safari Opera
4.0 6.0 7.0 3.1 11.0
9.0 -o-