You all know how to modify dedecms's restricted title length and ellipsis. Sometimes, webpagesArticleWhen the title is too long, it will affect the appearance of the webpage. Therefore, we need to trim it to limit how many texts it only displays, and replace the extra content with a ellipsis. so how can we achieve this with dedecms? Several methods are listed below for your reference:
1. How to modify
We should all know how to use
text-overflow:ellipsisproperty to implement a single-line text overflow display ellipsis (...). Of course, some browsers also need to add width
widthProperty.
CSS code:
Overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
However, this property does not support multiple lines of text overflow display ellipsis, here a
First, add a little bit to the previous article.The previous article was called "Force span does not wrap." At that time just realized the function, did not know its why. Recently learned a little page production knowledge, the principle has a bit of understanding. For single-line text, the implementation overflow does not wrap and the ellipsis indicates that it can be fully implemented through CSS, the cod
"Single-line text overflow display ellipsis (...)text-overflow:ellipsis-----Some browsers also need to add width width properties.Overflow:hidden;text-overflow:ellipsis;white-space:nowrap;Multiple lines of text overflow display ellipsisWebKit a browser or mobile pagepage implementations in WebKit browser or mobile (mostly WebKit kernel browsers) are simple and can be directly used with WebKit CSS extension
the difference of several ellipsis in MathType
1. Horizontal ellipsis
The horizontal ellipsis is the most used ellipsis and is used when parsing multiple formulas and variables, which can be edited directly in the MathType "Space and Ellipse"-"horizontal ellipsis". This
Overflow of single-line text displays ellipses (...)Text-overflow:ellipsis;3 White-space:nowrap;However, this property does not support multiple lines of text overflow display ellipsis, here according to the application scenario describes several methods.WebKit a browser or mobile pageIn WebKit browser or mobile (most of the WebKit kernel browser) page implementation is relatively simple, you can directly use the WebKit
The problem in question is split into two:
1. How do I use ellipsis instead of text when the length is exceeded?
2. How long is the length of the text after the omission of the display, how to hover when the mouse, in the form of a floating box to display all the information?
How do I implement ellipsis instead of text when it exceeds length?
Using CSS to imp
General CSS Method--can implement Ie,safari,chrome,opera browser text overflow ellipsis indicates that this is a test text, mainly used to test whether the text overflow will be displayed with ellipses.1 . Zxx_text_overflow_1 {width:27em; white-space:nowrap; text-overflow:ellipsis; -o-text-overflow:ellipsis; overflow:hidden;}How jquery limits character count1 HTML section: 2 class= "zxx_text_overflow_5">
Can I use the ellipsis (...) in the excess parts in javascript? Are there any plug-ins? For example, in this demo, jsfiddle. netkanjiushipg7c78qe only wants to keep one line. If the line is exceeded, it is omitted without line breaks. In addition, php omitted. What is the name of the function? Is it possible to use the ellipsis (...) in the excess part in javascript? Are there any plug-ins?
Like this demo,
Not to do the front-end for a long time, today from the refactoring to understand that CSS3 has been able to achieve a lot of the past must be achieved through JS, such as gradients, shadows, automatic truncation of text display ellipsis and other powerful effects, and these features are maturing, has been used in a large number of production environments. The H5 is really maturing, and has to be made up of evil.The following share implements the demo
Angularjs's paging focus is on the use of filters. This filter is also not complicated.
First on the HTML code:
This is used Ng-class, the current page currentpage equal to page number num, display the currentstep style, not equal to show the style of step.
Key code in line 13, ng-repeat analog data added filter, filter name is called paging and a angular filter limitto.
Then there is the CSS code, there is nothing to say, mainly the tone
Someone would ask, why did I putText-overflowTake it out and explain it alone. Previously, when a line of content was not complete, you would want to display the ellipsis byJavaScriptand other means. But CSS3 introduced aText-overflowEllipsis attributes, only need a short line of code can be implemented, the development of a simple and powerful way of self-evident. This article, I said to lead you to make a "today headline" News navigation list, to le
Although IE9 phase out, but ... To be compatible with IE8 's multi-line ellipsis function, the JQ plug-in ellJQuery.fn.ell =function(count) { for(vari = 0; I This). length; i + +){ varEle = $ ( This). EQ (i); //width and height of the words varW =ele.width (); varH =ele.height (); //get element ' s children p varp = ele.find (' P '); //get element ' s lineheight varLineheight = parsefloat (ele.css (' line-height ') | | ele
Mobile Browser Type:UC Browser, QQ browser, open Gate browser, Baidu Mobile browser, 360 Security browser, Google Browser, Sogou Mobile browser, Cheetah browser, other browserDomestic UC and QQ, Baidu and other mobile browsers are based on the WebKit modified kernel, the domestic not self-developed core, like the domestic mobile phone operating system are based on Android modifiedBecause the mobile side (the vast majority of browsers based on the WebKit kernel), you can directly use the WebKit
A news title in a news list that is frequently encountered during development is too long. In this case, you can add a set of CSS rules to it to hide the characters that exceed the box and display the ellipsis at the end.
Style:
Explanation:
White-spaceHow to process the blank space in an element in attribute settings
White-space: nowrap; indicates that the text will not wrap, and the text will continue o
Css3 multi-row ellipsis, css3 multi-row-Webkit-line-clamp Overview:
-Webkit-line-clamp is an unsupported WebKit property that does not appear in the CSS specification draft.
Limit the number of lines of text displayed on a block element. To achieve this effect, it needs to combine other external WebKit attributes. Common attributes:
display: -webkit-box;Attributes that must be combinedTo display objects a
First set the CSS style:Table {table-layout:fixed;}Table code in HTML: "The fixed width of th should be set for bootstrap"Set TD to automatically display an ellipsis over a fixed width:Table TR TD { Overflow:hidden; White-space:nowrap; Text-overflow:ellipsis; -o-text-overflow:ellipsis; -moz-text-overflow:ellipsis; -webkit-text-overflow:ellipsis;}The TD content in
Overview-webkit-line-clamp is a non-canonical attribute (unsupported WebKit property) that does not appear in the draft CSS specification.Limits the number of lines of text displayed in a block element. To achieve this effect, it needs to combine other foreign webkit properties. Common binding Properties:Display:-webkit-box; You must combine the properties to display the object as an elastic telescopic box model.-webkit-box-orient must combine propert
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service