阅读背景:

在绝对定位中进行水平垂直居中的两种方法

来源:互联网 

在绝对定位中进行水平垂直居中的两种方法

1.这种方法最常用,适合固定长宽的块级元素

<pre name="code" class="css" style="font-size: 18px; font-weight: bold;">{
width:300px;
height:200px;
left:50%;
top:50%;
margin-top:-100px;
margin-left:-150px;
}<



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: