Because the display control of Android software requires that the length exceed a certain value to be truncated and added with a ellipsis, this method is written:
Package COM. eoeandroid. demo. testcode; import android. app. activity; import android. graphics. bitmap; import android. graphics. bitmapfactory; import android. graphics. matrix; import android. graphics. drawable. bitmapdrawable; import android. OS. bundle; import android. view. viewgrou
Previously UsedProgramIt is difficult to determine whether it is a Chinese character or a non-Chinese character;
You can use style control to check the information on the Internet:
Span
Style
= "Width: 200px; overflow: hidden; text-overflow: ellipsis ;"
>
Nobr
>
A
Href
= "Detailcontent. asp"
Target
= "_ Blank"
>
Ultra-long titles
A
>
Nobr
>
Span
>
Adding a style to an existing page does not
OverflowAttribute-OriginallyIEThe property developed by the browser on its ownCss3And is supported by other browsers.
Specifies the display method for content that cannot be accommodated in the box.
Overflow:HiddenText that exceeds the allowed range is hidden.
Overflow:Scroll DivThe element has a fixed horizontal and vertical scroll bars.
Overflow:AutoHorizontal or vertical scroll bars appear only when the text exceeds the limit
Overflow:VisibleDisplays the effect and does not useOverf
Disclaimer: All rights reserved. Reprint must indicate source:http://blog.csdn.net/cartzhang/article/details/44203651Today I want to write a macro definition, I found that the macro definition can also write indeterminate parameters, but my macro is not used at the end.Because I think that after writing, this indefinite parameter brings me the trouble, better than the benefits of thinking more.So I defined two macros and defined the other with one macro.Take note of today's use of the C + + type
1, layout and style such as:2, JS obtained the Div object, and then determine the height of the Div object, if it is greater than the height of a line to indicate that there are two lines of content, and then get the contents of the span tag and use a regular six characters to replace the "..." The implementation code here can write span.innerhtml = Span.innerHTML.replace (/. ( \.\.\.\.\.\.)? $/, "..."); then set the display property of the A link to a.style.display= ""; The A hyperlink is displ
= 0; If Curbyte>0 and curbyteThe Getshortname () function is then called in the module interface Scenebattlesetment.lua file that needs to use the role name:--note SName is the player's name local sName = Wbattleglobal:getcurrent (): Getherowithid (Self.playerids[index]). m_splayername Local ttfname1 = Element:getchildelement ("Teammatename") assert (Ttfname1, "Ttfname is nil") Local Sshortname = Getshortname (sname,12,7) --The calling function displays the appro
In flex3, you can use the truncatetofit = "true" attribute of label to truncatetofit to truncate long text and display... (ellipsis ). The usage is as follows:
However, after flex4, mx: Label is replaced with S: label, and this attribute is not available. To implement the same function, use the following code.
Width = "100%"Height = "100%"
Verticalalign = "Middle"
Linebreak = "Explicit"
Maxdisplayedlines = "1"
TEXT = "truncated long text"/
A very interesting scenario is encountered in the project:The layout requirement is this: creating a new Order on the right is fixed width of 80px, the left side is adaptive width, overflow hidden. Such as.The layout here needless to say definitely using Display:flex. Left flex:1; right width:80px;.Originally on my machine is a variety of OK, but to the back end of the brothers found in his machine on the left side and no flex:1;Always with a fixed width of the pestle in there, destroying the la
Write mobile phone page when encountered, more than two lines of text, more text needs to be omitted.CSS code:Overflow:hidden;Text-overflow:ellipsis;Display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;This is good, because the mobile phone page is not compatible with the FF browser to see the effect of the time, there is a lot of compatibility issues.Baidu a bit, found useful after the wording, no compatibility problems! Convinced ~Cross-Browser compatible scenariosA relatively
Shanghai's unique culture, Shanghai people are more than the department of Jiangsu and Zhejiang people use Wu. As early as the Song Dynasty has the name of "Shanghai", 1843 years later, Shanghai became the opening port and rapidly developed into the largest city in the Far East, today's Shanghai has successfully held the 2010 World Exposition, China Shanghai International Art Festival, Shanghai International Film Festival and other large international events. Shanghai Jurisdiction 15 Districts,
with because WordPress has a method that provides such a direct display of the digest, if not defined SummaryHe will intercept the contents of the text part of the displayCommon topics are often used in conjunction with conditional statements.PHP if (Is_category () | |is_archive ()) { the_excerpt (); } Else { the_content (); ? >So you can get rid of it at once. All articles that make such a list of articles display the desired body summaryIn addition WordPress
The length exceeds the specified length. The ellipsis is displayed.Set class to displayPart,Set the custom owner. displayLength can be displayed (not including...), double-byte characters, length * 2,Copy codeThe Code is as follows: Copy codeThe Code is as follows:Hello worldhello world !!!
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