【发布时间】:2014-05-25 15:06:01
【问题描述】:
我们如何才能使这个 div 中的文本居中(水平和垂直)?
HTML
<div class="text">
hello is the the testhello is the the testhello is the the testhello is the the testhello is the the testhello is the the
testhello is the the tes
</div>
CSS
.text {
width:150px;
background:red;
float:left;
height:150px;
margin:10px;
text-align:center;
word-wrap:break-word;
overflow:hidden;
color:white;
}
【问题讨论】:
标签: css