DIV+CSS常用属性定义说明

.toptab { 

02     min-width:60px;/*最小宽度*/

03     _width:60px; /*实现min-width兼容 IE6*/

04     overflow: hidden;/*不出现滚动条*/

05     float:left;/*左浮动*/

06     padding:2px 6px 0 6px;/*定义元素内边框,上右下左*/

07     margin:0 10px 0 0;/*定义元素外边框,上右下左*/

08     text-align:center;/*文本居中对齐*/

09     height:22px; 

10     line-height:22px; /*两个高度一致,使文本上下垂直居中 */

11     font-size: 12px;/*文字大小*/

12     background-color:#ffffff;/*元素背景颜色*/

13     color: #333333;/*文字颜色*/

14     font-weight: normal; 

15     text-decoration: none;/*不出现下划线*/

16 }


ps:内联(display:inline;)属于行布局,其特性是在一行里进行布局,不能设置宽高

你可能感兴趣的:(div+css)