我正在練習使網頁響應手機屏幕分辨率。我成功的寬度。我如何處理這個高度?我的包裝繼續保持在頂部而不是垂直對齊。如何垂直對齊我的包裝,以便它將在(移動)屏幕上居中顯示?
我見過關於這個問題的很多問題,但是找不到在我的css上指定的解決方案。希望有人能幫助我。
HTML
<body>
<div class="wrapper">
<div class="header">
</div>
<div class="content">
<a href="http://test"><div id="topleftbox"></div></a>
<a href="http://test"><div id="toprightbox"></div></a>
<a href="http://test"><div id="bottomleftbox"></div></a>
<a href="http://test"><div id="bottomrightbox"></div></a>
</div>
</div>
CSS
body {
}
.wrapper {
margin: 0 auto;
width: 100%;
height: 100%;
}
.header {
min-width: 50%;
height: 20px;
}
.content {
min-width: 500px;
width: 40%;
height: auto;
margin: 0 auto;
}
#topleftbox {
background: url(..);
background-repeat: no-repeat;
width: 229px;
height: 228px;
float: left;
}
#toprightbox {
background: url(...);
background-repeat: no-repeat;
width: 229px;
height: 228px;
float: right;
}
etc.