Text-overform:ellipsis ellipsis/clip cropped.
Overform:hidden overflow hidden text.
However, Text-overflow is only used to illustrate how the text overflows when displayed, to achieve an ellipsis effect when overflow, but also to define mandatory text to be displayed on one line (white-space: nowrap) and overflow content is hidden (Overflow:hidden), the only way to achieve overflow text display ellipsis effect, the code is as follows:
Text-overflow:ellipsis; Overflow:hidden; White-space:nowrap;
At the same time,Word-wrap can also be used to set the text behavior If the current line exceeds the bounds of the specified container.
Grammar:
Normal is the browser default,Break-word set to wrap within a long word or URL address , this property is not commonly used, with the browser default value.
[Email protected]: You can set a font style that is not on your computer {
Font-family
: "MOOC Font"
SRC: The relative or absolute path of the font file on the server
}
p{When setting fonts
font-family: "MOOC Font"
Required, set font-family same value in @font-face
}
3.
Text-shadow can be used to set the shadow effect of text.
Grammar:
Text-shadow:x-offset y-offset blur color;
X-offset: Represents the horizontal offset distance of the shadow, whose value is positive when the shadow is offset to the right, and vice versa;
Y-offset: Refers to the vertical offset distance of the shadow, and if its value is positive, the shadow is shifted downward and the inverse is offset upward;
Blur: Refers to the degree of blur of the shadow, its value cannot be negative, if the higher the value, the more blurred the shadow, the clearer the shadow, if you do not need shadow blur can set the Blur value to 0;
Color: Refers to the colors of the shadow, which can use the RGBA color.
For example, we can use the following code to set the shadow effect.
Font styles in CSS3