p标签中的设置成垂直居中对齐
来源:2-10 作业题
晚风142536
2020-02-05 13:32:07
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>2-9</title>
<style>
.about-top > .middle{
width: 100%;
height: 200px;
margin-top: 50px;
}
.about-top > .middle > p{
display: inline-block;
color: gray;
text-align: center;
line-height: 1.5em;
margin: 0 auto;
}
</style>
</head>
<body>
<div class="middle">
<p>Lorem Ipsum is simply dummy text of the printing and typesetting
<br/>insustry.Lorem Ipsum has been the industry's standard dummy
<br/>text ever since the 1500s</p>
</div>
</body>
</html>
1回答
同学你好,按照本作业的效果图,这段文字水平居中就可以了。可以参考下方:
如果我的回答帮助到了你,欢迎采纳,祝学习愉快~
相似问题
回答 2
回答 1