

Code:ĭisplay: -webkit-box /*Properties that must be combined to display the object as an elastically scalable box model*/ The webkit kernel browser-specific method is used here, so it can be used on the mobile side. Unlike single-line text, the above text-overflow attribute cannot be used here. There are two lines of text here, when the second line of text overflows, hide the overflowing text and show '.' ③text-overflow: ellipsis, which can be used to hide the text beyond the range with the ellipsis "." in the case of multi-line text. ②-webkit-box-orient The properties that must be combined to set or retrieve the arrangement of the child elements of the flexbox object. ①display: -webkit-box Attributes that must be combined to display the object as an elastically scalable box model. To achieve this effect, it needs to combine other WebKit properties. webkit-line-clamp is used to limit the number of lines of text displayed in a block element. The implementation of the page in the WebKit browser or mobile terminal (most of the browsers with the WebKit core) is relatively simple, you can directly use the CSS extension property of WebKit (WebKit is a private property)-webkit-line-clamp Note: This is a An unsupported WebKit property, which does not appear in the draft CSS specification.
#Play excitebike free code#
The code to implement multi-line overflow hiding with CSS is very simple, but the compatibility is relatively low. Multi-line text overflows display ellipsis (…) Next, let's focus on multi-line text overflow and display ellipsis, as follows.Ģ. Its role is to keep the text from wrapping, which is the basis for overflow: hidden and text-overflow: ellipsis to work! Without it overflow:hidden and text-overflow:ellipsis cannot work! (in the case of single-line text overflow omitted)īut this property does not support multi-line text overflow display ellipsis. You can think of it as a 'special style' for overflow to hide text overflow.

It can only take effect if overflow: hidden is set. This property depends on the existence of overflow: hidden. Implement the effect of the p element hiding its overflow and setting (.) ②Special usage of overflow: hidden: in the above example with text-overflow: ellipsis white-space: nowrap
-1490840483.jpg)
①overflow: common usage of hidden: used in the outer layer of block-level elements (such as div) to hide inner overflow elements Here we need to pay attention to one thing: the overflow here is not set as the attribute of the parent element div, but the attribute of the p tag, which needs to be distinguished from the common usage of overflow ②ellipsis: When the inline content overflows the block container, replace the overflow part with (.) ①clip: When the inline content overflows the block container, the overflow part is cut off
#Play excitebike free how to#
Text-overflow: defines how to handle text overflow, there are 2 valid values: The three css properties set for the p tag above are required and indispensable, among which: Of course, some browsers also need to add the width attribute. Everyone should know that the text-overflow:ellipsis attribute is used to achieve overflow display ellipsis (…) on a single line of text. The monitor displays the ellipsis tutorial. Let's sort out the compatible browsers below. The ellipsis can use text-overflow: ellipsis in ie, but many browsers require a fixed width, and ff these browsers do not support the text-overflow: ellipsis setting. Single-line text overflow displays ellipsis (…)
