1. Container width: width: value; (px, %, both are acceptable)
2. Mandatory text Display in one line: white-space:nowrap;
3. Overflow content is hidden: overflow: hidden;
4. Overflow text displays ellipses: text-overflow: ellipsis;
Note: It must be a single line of text to set the overflow of this article! ! !
IE6+; chrome1.0+; safari3.1+ (firefox, opera are not supported yet)
3. Several conditions for vertical centering
To set an element to be vertically centered in a container, you must change the default display attribute value to inline-block;
and add the sibling element (ruler) (sibling element [ruler] style Set to vertical-align:middle;width:0;height:100%;display:inline-block;).
Three conditions:
1: The container (parent element) must be added text-align:center;
2: The current element must be converted into an inline block element (display:inline-block;) Then add vertical-align:middle;
3: Add the sibling element span after the current element (without carriage return); and perform vertical-align on span: middle;width:0;height:100%;display:inline-block
4. Replacement elements and non-replacement elements
Replacement elements and non-replacement elements
a) Replacement elements: The browser determines the specific display content of the element based on its tags and attributes. For example: the browser will read the image information and display it based on the value of the src attribute of the