Tip: You can modify some of the code before running
<! DOCTYPE html> <ptml> <pead> <meta charset= "Utf-8"/> <meta http-equiv= "X-ua-co" Mpatible "content=" ie=edge,chrome=1 "/> <title>demo</title> <style type=" Text/css "> . box {position:relative; width:500px; height:300px; border:1px solid #FFF; Background-color: #999; display:table; }. wrap{Display:table-cell; Vertical-align:middle; *position:absolute; *top:50%; *left:0; } content {*position:relative; *top:-50%; *left:0; } </style> </pead> <body> <div class= "box" > <div class= "Wrap" > <p class= "Content" > I'm just a few lines of text I am a few lines of text I am a few lines of words I am a few lines of text I am a few lines of text I am a few lines of text Fixed-width text wrap and vertical play "> fixed-width text automatically wrap and vertical play </p> </div> </div> <div class= "box" > <div class= "wrap" > <p class= "Content" > It's just a few lines of text, I'm just a few lines of text, I'm just a few lines of text, I'm just a few lines, I'm a few lines of text, I'm a few lines of text, just a few lines of text. Yes, I'm just a few lines of text, I'm a few lines of text, I'm just a few lines of text, just a few lines of text just a few lines of text I am a few lines of text I am a few lines of text, I It's just a few lines of text I'm just a few lines of text I'm a few lines of text </p> </div> </div> </body> </pt Ml></td> </tr> </table>
Tip: You can modify some of the code before running