我有这个侧面窗格。它的高度是80%。在这个侧面我有一个文本。我希望这总是在中间。将div放在另一个div的中间,高度为百分比时
主要格:
.simulation {
height: 80%;
width: 500px;
border: 1px solid #ccc;
box-shadow: 8px 8px 7px #A5A5A5;
background: #FFF;
position: absolute;
top: 10px;
z-index: 100;
left: -450px;
transition: 500ms ease all;
}
次DIV:
.simulation .simulation-content .simulation-bar .heading {
position: relative;
margin-top: 340px; /* How do I get this in the middle?? */
-webkit-transform: rotate(-90deg);
}
我不能得到的margin-top权当我在%表达出来。
Plunkr:http://plnkr.co/edit/Z8xZNYLNvShQDVPZMZgk?p=preview
我不明白这一点。 ***这个问题可以问多少次!?!*** – jbutler483 2015-03-31 07:56:48