CSS text overflow ellipsis
Text-overflow:ellipsis
Ext-overflow is a special attribute, which is defined by the previous document in the current document (which does not contain the Text-overflow attribute, fml!):
Name:text-overflow-modeValue:clip | ellipsis | Ellipsis-wordClip: Do not show
1. General CSS Method--can implement Ie,safari,chrome,opera browser text overflow ellipsis representationThis is a test text, mainly used to test whether the text overflow will be displayed with ellipses.
The code is as follows
Copy Code
Zxx_text_overflow_1{width:27em; white-space:nowrap; text-overflow:ellipsis;-o-text-overflow:ellipsis; overflow: Hidden;}
2. Use Ellip
Code: Overflow:hidden; white-space:nowrap; text-overflow:ellipsis;Key code:text-overflow:ellipsis;Explanation: The simple understanding is that I want to limit the text to one line (white-space:nowrap;), that the line is bound (width), and that the part of your overflow is to be hidden (overflow:hidden;), and then an ellipsis ( text-overflow:ellipsis). Text-ellipsis is a special style, and the explanation i
The CSS controls the list of articles so that the text that overflows the title behaves in an elliptical way. with the above code can be implemented, but if you want to achieve the effect of the combination of multiple CSS definition can be achieved. below let's look at the definition of each CSS inside: Text-overflow:clip |
Original: CSS Learning Note: Overflow text ellipsis (text-overflow)In CSS3, the basic syntax for the Text-overflow property is as follows:
Clip: Indicates that the omitted text is not displayed and is simply trimmed.
Ellipsis: Indicates that an ellipsis is displayed when an object text overflows, and the c
If the implementation of a single line of text overflow display ellipsis students should know to use the Text-overflow:ellipsis attribute, of course, also need to add width of the genus to be compatible with some of the browsing.Implementation method:1 Overflow:hidden; 2 text-overflow:ellipsis; 3 White-space:nowrap;EffectBut this property only supports a single line of text overflow display ellipsis, if we
trimmed with the size of the window or frame that contains the object. and the Clip property setting will failAuto: Object content is trimmed or scroll bar is displayed when requiredHidden: Do not display content that exceeds the object sizeScroll: Always show scroll barsTurn: http://blog.163.com/amy0713@126/blog/static/1370485372011656210202/
Another source introduction:
div+css Set text over width does not wrap and does not display
When a line of
CSS text overflow ellipsis
Text-overflow:ellipsis
Ext-overflow is a special attribute that is in the previous document (the current document does not contain the Text-overflow attribute, fml!) The definition of this is:
Name:text-overflow-mode
Value:clip | ellipsis | Ellipsis-word
Clip: does not show
Valid only for single-line text;01. For block ElementsUL li{width:180px;text-overflow:ellipsis;white-space:nowrap;/* prohibits automatic line-wrapping */overflow:hidden;}
CSS text exceeds auto display ellipsis display ellipsis
CSS text exceeds auto-display ellipsis
http://www.php.cn/wiki/864.html">Line-height:1.76em; " > Reasonable truncation of multiple text is not an easy thing, we usually use several methods to solve:
Overflow:hidden to hide extra text directly
Text-overflow:ellipsis only applies to single-line text processing
A variety of more vulnerable JavaScript implementations. The reason for this is that the vulnerability of this implementation is due to the need to change the text length of time to get Reflow (relayout) after the layo
Code: Overflow:hidden; White-space:nowrap; Text-overflow:ellipsis; Key code: text-overflow:ellipsis; Explanation: The simple understanding is that I want to limit the text to one line (white-space:nowrap;), that the line is bound (width), and that the part of your overflow is to be hidden (overflow:hidden;), and then an ellipsis ( text-overflow:ellipsis). Text-ellipsis is a special style, and the explanatio
Single-line text control, previously completed by programmers, achieves word cut effect. The method described today is compatible with IE and ff. For more information, see the following. To be more practical, use a div to install the content to be debugged and define a width for the div. For example:Single-line text control, previously completed by programmers, achieves word cut effect. The method described today is compatible with IE and ff. For more information, see the following. To be more p
Example, the original thought that the text overflow processing more complex, did not expect such a simple sentence to be done, CSS is really magical:
The code is as follows
Copy Code
. li {white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
This is just using the CSS Text-overflow attribute, this property is more special, in the current
Grammar:
Text-overflow:clip | Ellipsis
Parameters:Clip: Do not show ellipsis (...). ), but simply cut(Clip This parameter is not commonly used!) )Ellipsis: Displays an ellipsis (...) when text overflows inside an object. )
DescriptionSets or retrieves whether an ellipsis
One, single-line text overflow display ellipsis (...)Ellipsis in IE can use text-overflow:ellipsis, but there are a lot of browsers need fixed width, and ff these browsers do not support text-overflow:ellipsis settings, Here's a look at the compatibility of each browser display ellipsis tutorial. Everyone should know to use the Text-overflow:ellipsis property to
In CSS3, the basic syntax for the Text-overflow property is as follows:
Clip: Indicates that the omitted text is not displayed and is simply trimmed.
Ellipsis: Indicates that an ellipsis is displayed when an object text overflows, and the caret insertion position is the last character.
Ellipsis-word: Indicates that an
HTML uses CSS to make the text out of the section with an ellipsis of three points to display the method:I use the following code correctly, Li inside is a mark. Use in IE and Google is normal, Firefox does not know, I do not care, waiting for you to testJi=Display:block;Overflow:hidden;Word-break:keep-all;White-space:nowrap;Text-overflow:ellipsis;}Just take this CSS
HTML uses CSS to make the text out of the section with an ellipsis of three points to display the method:I use the following code correctly, Li inside is a mark. Use in IE and Google is normal, Firefox does not know, I do not care, waiting for you to testli{Display:block;overflow:hidden;word-break:keep-all;white-space:nowrap;text-overflow:ellipsis;}Just take this CSS
Because of the need for page typesetting, there are some places that require too long a problem plus an ellipsis. For example: the title limits the width of 20 Chinese, and the excess is replaced with an ellipsis. Before the use of procedures to intercept the method, but using CSS to intercept more conducive to SEO.
Here's how to use it:
This i
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.