好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

CSS关于子元素设置了float属性后父元素高度为0的解释和解决方法_html/css_WEB-IT

 1   2   3   4    5   test1  6    7  #container { 8  background-color: #f1f1f1; 9  width: 80%;10  margin: 20px auto;11  }12  .item {13  float: left;14  color: white;15  text-shadow:0 1px black;16  margin: 10px 20px;17  padding: 20px;18  }19  #container > .item:nth-child(1) {20  background-color: #F00080;21  }22  #container > .item:nth-child(2) {23  background-color: #D8AAD8;24  }25  #container > .item:nth-child(3) {26  background-color: #A2aa5A;27  }28  #container > .item:nth-child(4) {29  background-color: #63B8FF;30  }31   32  33  34 

35

36 No.137

查看更多关于CSS关于子元素设置了float属性后父元素高度为0的解释和解决方法_html/css_WEB-IT的详细内容...

  阅读:40次