所以我在jsfiddle中实现了我期望实现的目标。我不知道是否有实现这一相同的效果更简单的方法:将两行文本居中放在一行旁边,HTML/CSS
<div class="date">
<span class="day">05</span>
<div class="dateHolder">
<span class="month">DEC</span>
<span class="year">2013</span>
</div>
.date {
position: absolute;
font-family: Arial;
font-weight: bold;
background: rgba(0, 0, 0, 0.8);
color: #fff;
width: 110px;
height: 60px;
padding: 10px;
}
.dateHolder {
margin-top: 10px;
}
.day {
font-size: 50px;
line-height: 60px;
float: left;
}
.month, .year {
float: right;
font-size: 20px;
line-height: 20px;
display: block;
}
感谢您的建议,这对我来说似乎是最简单的解决方案。干杯。 – MyKungFuIsGood