[TOC]
## postion为绝对定位后,元素如何水平居中
~~~
.mybox {
position: absolute;
left: 50%;
top: 300px;
-webkit-transform: translate(-50%, -50%);
-moz-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
width: 400px;
}
~~~