Home  >  Article  >  Web Front-end  >  CSS相关知识和经验的碎片化记录_html/css_WEB-ITnose

CSS相关知识和经验的碎片化记录_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:22:16906browse

1、子DIV块中设置margin-top时影响父DIV块位置的问题

<strong>解决办法</strong><strong>1:</strong>若子DIV块中使用margin-top,则在父DIV块中添加:overflow:hidden;
<strong>解决办法</strong><strong>2:</strong>在子DIV块中用padding-top代替margin-top。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn