摘要:
圣杯布局: 原理:给包裹层设置左右padding值空出left和right的位置,使用负边距,左边margin-left:-100%,右边margin-left:-100px;此时左右两个盒子位于主盒子两侧但是会遮挡住主盒子的内容,所以再给左盒子position:relative,left:-100 阅读全文
摘要:
/*html部分*/ <div class="container"> <div class="inner"></div> </div> 1.利用绝对定位和负外边距居中,此种方法需要知道inner元素的宽高 .container{width:500px;height:500px;position:re 阅读全文