The code of the multi-line text vertical center instance implemented by CSS,
Example code of multi-line text vertical center implemented by CSS:
It is very easy to vertically center a line of text in the container. It only requires two lines of code, for example:
div{ width:100px; height:100px; line-height:100px;}
The above code can achieve the vertical center effect of a single line of text in the div, as long as the div's height attribute value and line-height are set to the same.
However, the above Code cannot vertically center multiple lines of text. Let's look at another code example:
<! DOCTYPE html>
The above code implements vertical center alignment of multiple lines of text. We will not introduce it here. You can apply it directly.
The original address is: http://www.softwhy.com/forum.php? Mod = viewthread & tid = 9626.
For more information, see: http://www.softwhy.com/divcss/