css div width is automatically hidden and ellipsis is displayed and -->Fdsafdsaklfdjsaklf; djakl; fdjsakf; djsakfldajfklda; fjdsaklThe first website in China is www.111cn.net, which provides the latest webpage creation tutorial, webpage design
new document
1 Xiao Wang's shoes are big bad guys, Xiao Wang's shoes are big bad guys, and Xiao Wang's shoes are big bad guys; xiao Wang's kids shoes are big bad guys; 1 Xiao Wang's shoes are big bad guys, and Xiao Wang's shoes are big
Detailed Text-overflowGrammar:text-overflow: Clip | Ellipsisdefault value :clipapplies to : block-level container elementsInheritance : NoneAnimation : NoCalculated value : Specify a valueValue:
Clip: When inline content is removed from the block container, the overflow is trimmed off.
Ellipsis: When inline content removes a block container, replace the overflow part with the (... )。
Note: To ma
css shows the excess part as a ellipsis. This method is compatible with Firefox _ script house _ www.jb51.net. technical space of suntear technical space of suntear technical space of suntear technical space of suntear technical space
/*table-layout:fixed will make the table equally divided*/#TreeView1 Table{width:290px;Table-layout:fixed; }#TreeView1 Td:first-child{width:8%;}/*+ Select the next sibling node Note + There are spaces before and after*/#TreeView1 Td:first-child + TD{
Label: style blog Io OS ar Java for SP
I encountered a problem during my project today. I posted it here to let the experts think about a better method.
When the data is displayed, if the string is too long, a string of a certain length will be captured and then displayed with a ellipsis. It can be a letter or a Chinese character, and the length of uppercase and lowercase letters is different even though the length is the same, is there any way to
DOCTYPE HTML>HTML> Head> styletype= "Text/css">//css Control The content is too long displays the ellipsis and the full contents when hovering. Li1{List-style:None;width:200px;White-space:nowrap;Text-overflow:ellipsis;-o-text-overflow:ellipsis;Overflow:Hidden;Margin-top:5px; }. Li2{List-style:None;Margin-top:5px; } style> Head> B
Everyone should know that using text-overflow:ellipsis attributes to implement an overflow of single-line text displays an ellipsis (...). Of course, some browsers also need to add width width properties.
Overflow: hidden;
Text-overflow: ellipsis;
White-space: nowrap;
However, this property does not support multiple lines of text overflow display
In the past few days, the company's Intranet has a lot of processing on the homepage to intercept strings. Currently, at my level, only functions in the jstl expression are used to intercept strings, the code with excessive truncation length omitted is as follows:
$ {Fn: substring (STR, 0, length)}
Disadvantages of the above Code: 1. It is too rigid. If the number of words is greater than the length, only the string with the length is displayed. As a result, if the letter (the letter is narrowe
As we all know, text overflow display ellipsis with CSS can be:Single-line text:White-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:block;Multiple lines of text:Overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;If you want to show the ellipsis in the middle??Now the demand is that a text is v
-space:nowrap;
However, this property does not support multiple lines of text overflow display ellipsis, here, according to the application scenario to introduce several methods to achieve this effect. WebKit Browser or mobile-side pages
In the WebKit browser or mobile end (most of the WebKit kernel browser) the page implementation is relatively simple, you can directly use the WebKit CSS Extended propertie
I. Overflow display ellipsis (Universal) for single-line textThe Text-overflow property specifies what happens when the text overflows the containing element. Ellipsis displays the ellipsis to represent the trimmed text.The White-space property sets how to handle white space characters within an element. NoWrap indicates that the text does not wrap, and the text
In order to achieve the end of the paragraph beyond the text to replace the ellipsis, write their own plug-ins, and made a simple optimization.Here are the script presentation pages and comments, before introducing the plugin parameters1.lineNum: Number. Limit the number of lines in a paragraph2.english: Boolean. English mode character is small, need to enlarge the screen space, the actual source code is modified by this parameter and cover op_num;3.o
How to use the text-overflow style attribute value ellipsis, overflowellipsis
1. Use the text-overflow style attribute value ellipsis in the div label:
Ii. Method of Using text-overflow style attribute value ellipsis in table tag sub-tag td Tag:
Note: The example in Code 2 fails to achieve the desired effect in some browsers (such as operabrowser.
{Text-over
Text-overflow: ellipsis is a great choice. On win, we all know that IE and Opera can be done. Will you be excited if you look at the following code?Text-overflow: ellipsis;-O-text-overflow: ellipsis;-Icab-text-overflow: ellipsis;-Khtml-text-overflow: ellipsis;-Moz-text-overf
1, single-line text overflow display ellipsis CSS notation1 Overflow:hidden; 2 text-overflow:ellipsis; 3 White-space:nowrap; /* No Line break */2, multiple lines of text display ellipsisThis is achieved based on the application scenario.1) WebKit Browser or mobile pageYou can use the private property of WebKit:-webkit-line-clamp (This property is not part of the CSS
Everyone should know that using text-overflow:ellipsis attributes to implement an overflow of single-line text displays an ellipsis (...). Of course, some browsers also need to add width width properties.Overflow:hidden;text-overflow:ellipsis;white-space:nowrap;However, this property does not support multiple lines of text overflow display ellipsis, here according to the application scenario introduced seve
-in, called the JS code as follows:$clamp ($ (". Container") [0],{clamp:2}); // Notice that you want to change the object under jquery to the corresponding native objectNote: If you set a high enough height for the container above the text, you will also see a contradictory screen with the remaining text appended to the ellipsis.If you want to learn more about how the Clamp.js plugin is used, please visit https://github.com/josephschmitt/Clamp.js/tree/master③ introduced the Jquery.dotdotdot.js p
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.