在css中,如果父元素的padding-top为0,子元素的margin会和父元素的margin合并,应用到父元素上,此时将父元素设置一个padding-top值,或者设置父元素的overflow为hidden即可解决