div标签中的元素margin-top失效的解决方法_HTML/Xhtml_网页制作

WBOY
Release: 2016-05-16 16:38:38
Original
1301 people have browsed it

如题。

问题很奇葩。元素上级标签是div,已经设置了width和height等的属性,可是,在对元素使用margin进行调整的时候,无法生效。同学经验提示,对该元素的父元素属性设置成

overflow:hidden;

问题就解决了。

Related labels:
source:php.cn
Statement of this Website
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!