分别让div浮层靠左靠右和居中

时间:2015-04-13 07:08:59   收藏:0   阅读:269


DIV居中:

 

<div style="margin-left:auto;margin-right:auto;width:760px;background-color:Silver;">
DIV居中 CSS 代码 <a href="http://jihua.cnblogs.com">jihua.cnblogs.com</a>
</div>

 

DIV靠右:

 

<div style="margin-left:auto;margin-right:2px;width:760px;background-color:Aqua;">
DIV靠右 CSS 代码 <a href="http://jihua.cnblogs.com">jihua.cnblogs.com</a>
</div>

 

DIV默认靠左:

 

<div style="width:760px;background-color:Fuchsia;">
DIV靠左代码 <a href="http://jihua.cnblogs.com">jihua.cnblogs.com</a>
</div>

原文:http://shiluoxinqing.blog.51cto.com/10109079/1631589

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!