Home >Web Front-end >HTML Tutorial >DIV 1 浮动在 DIV 2 的底部中间_html/css_WEB-ITnose

DIV 1 浮动在 DIV 2 的底部中间_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-21 09:46:041059browse


问题: DIV 1   浮动在   DIV 2  的底部中间 ?

2个DIV 互不嵌套




回复讨论(解决方案)

<style>#main{width:300px; position: relative;}#div1{	 width:140px;	 border:1px solid #fcc;	 margin:0 auto;}#div2{	 border:1px solid #ccc;} #div3{ position: absolute;  height:20px; width:100%; bottom:0px;} </style><div id="main"><div id="div3">  <div id="div1"> div1</div>    </div><div id="div2">111<br/>111<br/>111<br/>111<br/>111<br/>111<br/></div>	</div>

谢谢!!   可以用,但是会影响其它地方的div布局

可以了,谢谢!!!

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