【发布时间】:2013-03-13 10:58:31
【问题描述】:
我想将 h2 居中在 #top 内,但 vert-aliignt middle 不能使用相同的自动边距...我不知道该怎么做!
#top {
display: block;
position: relative;
height: 100px;
background-color: rgba(89,144,222,.6);
}
#top h2{
text-shadow: 2px 2px black;
text-align: center;
color: white;
font-family:"Impact";
font-size: 50px;
}
效果是-
【问题讨论】:
标签: html css text margin text-align