所以我有兩個元素,在我的情況下的圖像和按鈕。我在頁面頂部有圖片,底部有按鈕。我想有一個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) –