Blogger Information
Blog 25
fans 0
comment 0
visits 18810
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
内边距两种居中方法
℃级的博客
Original
1783 people have browsed it

实例

body{
	height:2000px;
}
/*不加div的居中方法,把另一个box设置小点覆盖原来box的css,进行缩进*/
.box{
  height:300px;
  width:300px;
  background-color:wheat;

   padding:50px;
}
 .box{
  height:200px;
  width:200px;

 
 
}
/*在img外加一层div,最外层padding设为0,里层div设置进行缩进*/
.box{
  height:300px;
  width:300px;
  background-color:wheat;

   padding:0px;
}
.box1{
	padding:50px;
}

运行实例 »

点击 "运行实例" 按钮查看在线实例


Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post