Heim >Web-Frontend >HTML-Tutorial >怎样让下面的图片覆盖在上面的图片?_html/css_WEB-ITnose

怎样让下面的图片覆盖在上面的图片?_html/css_WEB-ITnose

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-24 11:28:583297Durchsuche


这样两张图片 我怎样让下面那张上来 ,覆盖下拉框的那张图片?


回复讨论(解决方案)

position设置下z-index的值就可以了,设置值越大层越高。。要注意的是需要在根级比较才行。。
如:

    <div style="position:relative;z-index:2; width:500px; height:500px; background:red;">1</div>	<div style="position:relative;z-index:1; top:-20px; background:blue; width:600px; height:300px">    	<div style="position:relative;z-index:9999;">2</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