对li设置浮动,会对其父元素ul产生影响?
<style type="text/css">
*{margin:0; padding:0; font-size:14px;}
ul{ list-style:none;background:red;}
a{color:#333;text-decoration:none}
.nav li{ background:green;float:left}
.nav li a{ display:block; text-align:center; height:30px; line-height:30px; width:100px; background-color:#efefef; margin-bottom:1px;}
.nav li a:hover{ background-color:#F60; color:#fff}
</style>
为什么对ul值设置的背景色红色看不到了?