当前位置:编程学习 > html/css >>

在DIVCSS布局里面这margin:0 auto; width:990px; height:300px; overflow:hidden;} float:left; 什么意思?

.content{ margin:0 auto; width:990px; height:300px; overflow:hidden;} .contentleft{ float:left; width:700px; height:300px; overflow:hidden;} .contentright{ float:right; width:290px; height:300px; overflow:hidden; text-align:center;} .lleft{ float:left; width:350px; height:300px; overflow:hidden; text-align:center;}
补充:还有怎么让DIV 在同一行里面 分三块!求大侠打下代码介绍下T。T
答案:margin:0 auto; 是边距0;width:990px; height:300px; 是宽990高300;overflow:hidden是溢出部分隐藏;float:left; 是左侧浮动
你上面这个代码应该是contentleft contentright这样2个同行包含在content里这样的效果吧
做3个一行的话div按左中右顺序调用,左边的加float:left;属性,右边的加float:right;属性,中间的不要float,三个宽度和要略小于外框宽度
其他:margin:0 auto:可以让div居中
width:990px,div 长度
height:300px; 高度
overflow:hidden; div中的内容超过了,就隐藏
float:left;位置是 居左.
你可以下个css手册。然后在本机测试。做例子。很简单。 

上一个:js 怎么获取 css ?在线等待! 谢谢!
下一个:css中font-family后面以逗号分开的多个值是什么意思啊?

CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,