外边距溢出解决方法 高度塌陷如何解决

外边距溢出 描述 父元素没有上边框(border-top)或者没有上内边距(padding-top) 给子元素设置上外边距,会做用到父元素上 <style type="text/css"> #parent{ width: 300px; height: 300px; background-color: gray; } #child{ width: 150px; height: 150px; back
相关文章
相关标签/搜索