Home >Web Front-end >HTML Tutorial >div layer overlap posion:absolute_html/css_WEB-ITnose

div layer overlap posion:absolute_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:23:341264browse

divcss div layer overlap div css div layer overlap

	<body><!--第一部分-->		<div style="position:absolute;left:0px;width:100%;height:200px;">			<img src="bg_test123.jpg" width="100%"height="200"/>		</div><!--第二部分-->		<div style="float:left;width:300px;height:400px;">			<img src="bg_test123.jpg"/ style="width:300px;height:400px;">		</div>			<div style="float:left;width:300px;height:400px;">			<img src="bg_test123.jpg"/ width="300" height="400">		</div>			<div style="float:left;width:300px;height:400px;">			<img src="bg_test123.jpg"/ width="300" height="400">		</div>	</body>


Why is the content of the second part obscured by the content of the first part? What are the solutions?

Reply to the discussion (solution)

Add: position:relative to the second part of the div

Thank you, thank you very much for your help!

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