感谢您的支持,我会继续努力的!
打开微信扫一扫,即可进行扫码打赏哦
点我查看本站打赏源码!
Powered by RUNCODEX.COM,学的不仅是技术,更是梦想!!!
<div id="container">
<div id="header">
<div class="headerCenter">header</div>
</div>
<div id="left" class="left">
this left
<div class="content">
<div class="center">
this is content
<p>
this is p content
</p>
输入 JavaScript 代码……
xxxxxxxxxx
.headerCenter{
margin:auto;//设置width的同时,设置margin auto 可以使块元素中心居中
width:20%
}
.left{
float:left
.content{
float:left;//使块元素水平浮动
margin-left:10px;
width:70%
.p{
display:block //将内联元素转变为块级元素
.center{
margin-left:auto;
margin-right:auto;
width:30%;
background-color:#b0e0e6;