gpt4 book ai didi

html - 在 Div 上叠加 Div

转载 作者:行者123 更新时间:2023-11-28 02:51:31 25 4
gpt4 key购买 nike

我正在尝试将一个嵌入叠加在另一个嵌入之上,但我在执行此操作时遇到了一些困难,我想知道如何将一个嵌入叠加在另一个嵌入之上。

有没有办法只使用 Bootstrap ?

这是我的嵌入代码:

<div id="thePdfContainer" class="text-center">           
<embed src="www.example.com/pdf1.pdf" width="550" height="800" type='application/pdf' id="thePdf">
<embed src="www.example.com/pdf2.pdf" width="550" height="800" type='application/pdf' id="thePdf2">
</div>

最佳答案

不用 Bootstrap 也可以做到这一点

<div id="thePdfContainer" class="text-center">           
<embed src="www.example.com/pdf1.pdf" width="550" height="800" type='application/pdf' id="thePdf">
<embed src="www.example.com/pdf2.pdf" width="550" height="800" type='application/pdf' id="thePdf2">
</div>

CSS 代码:

#thePdf{
position:absolute;
top:50px;
left:50px;
z-index:1;
}

#thePdf2{
position:absolute;
top:100px;
left:100px;
z-index:2;
}

记住最高的 z-index 总是在最前面。相应地设置你的位置顶部,左侧。

关于html - 在 Div 上叠加 Div,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39183997/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com