所以我有两个元素,在我的情况下的图像和按钮。我在页面顶部有图片,底部有按钮。我想有一个div(或某些其它元件)来显示文本,但我需要它的两个元件之间的中心。围绕两个元素之间的一个div垂直
<div style="text-align: center;">
<img src="http://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png" alt="" />
<div style="text-align: center; border: 3px solid blue;">Help</div>
<button style="position: absolute; bottom: 5px;">Hi</button></div>
我使用HTML和Javascript。
[本文](http://vanseodesign.com/css/vertical-centering/)帮我垂直居中的CSS元件。 –
的可能的复制[如何verticaly对准到与定义宽度/高度一个div的内容的中心?](https://stackoverflow.com/questions/10968726/how-to-verticaly-align-into-the-中心的最内容的-A-DIV-具有定义-WIDT) –