如何将一个div覆盖在另一个div上

你离开我真会死。 提交于 2020-07-24 22:51:30

问题:

I need assistance with overlaying one individual div over another individual div . 我需要一个个人div覆盖另一个个人div

My code looks like this: 我的代码如下所示:

<div class="navi"></div>
<div id="infoi">
    <img src="info_icon2.png" height="20" width="32"/>
</div>

Unfortunately I cannot nest the div#infoi or the img , inside the first div.navi . 不幸的是,我无法将div#infoiimg嵌套在第一个div.navi

It has to be two separate div s as shown, but I need to know how I could place the div#infoi over the div.navi and to the right most side and centered on top of the div.navi . 如图所示,它必须是两个单独的div ,但是我需要知道如何将div#infoi放在div.navi ,最右侧并居中于div.navi顶部。


解决方案:

参考一: https://stackoom.com/question/CL8X/如何将一个div覆盖在另一个div上
参考二: https://oldbug.net/q/CL8X/How-to-overlay-one-div-over-another-div
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!