首页 > 其他 > 详细

多行文本居中

时间:2015-05-19 18:46:04      阅读:267      评论:0      收藏:0      [点我收藏+]

<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>

</style>

.wrapper {
width: 200px;
height: 200px;
background: skyblue;
font-size:0
}
.wrapper:before {
content: ‘.‘;
display: inline-block;
vertical-align: middle;
height: 100%;
}
.content {
display: inline-block;
text-align: center;
font-size:16px
}

</style>
</head>
<body>
<div class="wrapper">
<div class="content">多行文字居中 多行文字居中 多行文字居中 </div>
</div>
</body>
</html>

多行文本居中

原文:http://www.cnblogs.com/whuper/p/4515092.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!