说我输入了以下文字:
Essen Oxland Road, 34, LS4 7Du Leeds, United Kingdom
如何将样式显示为:
答案 0 :(得分:3)
将display:inline-block
与vertical-align:middle
HTML
<span class="left">
Essen
</span>
<span class="right">
Oxland Road, 34, LS4 7Du<br>
Leeds, United Kingdom
</span>
CSS
span.left, span.right {
display: inline-block;
vertical-align: middle;
}
请注意display:inline-block
在IE7及更低版本中无效。
答案 1 :(得分:0)
.left {
float:left;
line-height: 2.0;
}
<span class="left">
Essen
</span>
<span>
Oxland Road, 34, LS4 7Du<br>
Leeds, United Kingdom
</span>