最赞回答 / 蔬菜汤
overflow:hidden的作用是隐藏溢出你看下你的代码里div.logo_left的高度应该是83px;而整个div.logo的高度是80px;所以有3像素的溢出,卡住了nav-left;至于为什么div.logo_left的高度为什么是83px,这个我也不太清楚,还得像其他大神请教
2016-09-01
已采纳回答 / 孟哲
background包含了background-color,也包含了background-image等等一系列的属性,background-color和background-image同时定义的话图片会覆盖在颜色之上,
2016-08-30
在CSS中没有a和d选项中的属性,list-style-image可以把图像设置为列表中的项目符号;list-style-type可以设置列表项目符号的不同样式,如:none表示无项目符号,disc表示实心圆(默认值),circle表示空心圆,square表示实心方块等。
已采纳回答 / 十二月晴朗
我也有这个疑问,想提问搜到你的问题,刚才突然理解了。。哈哈哈。因为vertical-align:middle属性是相对于父元素垂直居中,文字其实是写在父元素div里的,所以设置后图片就相对父元素(也就是文字)垂直居中了。
2016-08-30
.mainBox{width:960px;background:#CFF;}
.mainBox:before,.mainBox:after{content:"";display:table;}
.mainBox:after{clear:both;}
.leftBox{width:740px;background:#C9F;height:300px;float:left;}
.rightBox{width:210px;background:#FCF;height:300px;float:right;}
.mainBox:before,.mainBox:after{content:"";display:table;}
.mainBox:after{clear:both;}
.leftBox{width:740px;background:#C9F;height:300px;float:left;}
.rightBox{width:210px;background:#FCF;height:300px;float:right;}
.mainBox{width:960px;background:#CFF;overflow:hidden;}
.leftBox{width:740px;background:#C9F;height:300px;float:left;}
.rightBox{width:210px;background:#FCF;height:300px;float:right;}
.leftBox{width:740px;background:#C9F;height:300px;float:left;}
.rightBox{width:210px;background:#FCF;height:300px;float:right;}