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

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-21 09:46:041133Durchsuche


问题: 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布局

可以了,谢谢!!!

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn