http://tinkerbin.com/ojXJuQfl为什么这个文本块不能垂直居中,只有一行?
我设法使用来自其他用户的指令和居中文本垂直,但它不允许我垂直居中整个事情。我想如果我把文本放在它自己的div中,它会这样做,但它没有。我怎样才能在箭头旁边放置一段?
垂直对齐CSS是非常混乱...
CSS
#arrow {
width:33px;
height:25px;
background-image:url('http://i.imgur.com/26tbf.png');
margin-left:55px;
background-position:0 50%;
float:left;
height:100%;
background-repeat:no-repeat;
}
#bulletwrap {
border:1px solid black;
width:325px;
height:75px;
}
#text {
background-position:0 50%;
line-height:75px;
}
HTML
<div id="bulletwrap"><div id="arrow"></div><div id="text">This is some longer text that needs to be centered next to the arrow grouped together</div></div>
老兄,是的,你是男人,非常感谢你。 – king 2012-08-03 18:05:13
我仍然一直使用此作为参考..再次感谢这个答案大声笑..一年后...... – king 2013-05-10 21:42:02
很高兴我可以帮助:)。 – bakkerjoeri 2013-05-14 09:30:43