gpt4 book ai didi

html - 当其中有绝对定位时,如何让这些 div 正确堆叠?

转载 作者:行者123 更新时间:2023-11-28 06:10:50 25 4
gpt4 key购买 nike

伙计...这里有很多人...这有点令人沮丧。我很少在这里发布问题,但当我这样做时,老实说,因为我花了数小时寻找解决方案,但出于某种原因,找不到解决方案。我认为这个社区的目的是帮助别人,而不是仅仅为了显示你的优越性。我已经阅读了太多线程,其中大多数评论和答案甚至与原始问题都不相关,我只是想知道为什么这么多时间花在抨击别人而不是试图提供帮助上?我来找你是因为我对 html 和 css 不是很熟悉,每次尝试我发现它只会把事情搞砸。这就是为什么我完整保留大部分代码的原因,因为当我在该部分中更改过多的内容时,它更改的变量比我预期的要多,我认为这可能会对建议的解决方案的可用性产生影响,所以我保留了大部分单独的代码。显然存在问题,是的,在这方面具有真正技能的人应该进行编辑,但这不就是我来这里的原因吗?因为我正在尝试利用我拥有的资源做我能做的事情并正在寻求专家的帮助?我只是不明白什么时候这个网站更多地是为了展示他人而不是帮助不幸的人。就像,一个人因为一些无关紧要的情况在高速公路上没油了,无论是因为他的仪表误报还是因为他不知道如何在车站使用泵,或者他只是健忘......随便,他正在寻求帮助,需要搭车或借电话给 friend 打电话,而你开车经过时靠近,减速并大喊,“你知道你真的应该让你的油箱加满 1/2!”或者“你的油漆看起来像垃圾!把它修好,然后我就会停下来!”


请大家查看,这是旧代码,我的任务是清理它,所以我真的很感激不要因为编码技术的问题而被打败......我只是想得到我问题的答案解决这个问题才能前进。我确实对此进行了研究,但由于不需要在图像上使用固定高度以及我需要外部 div 相对定位的事实......它创造了一个独特的场景,至少我认为。


我对如何让这些 div 正确堆叠感到困惑。我无法让主要内容 div(第 6 行)堆叠在具有/涉及绝对定位的第一个 div 下方(以便一个图像位于另一个图像之上)。

我还需要避免在图像上使用固定高度。因为我不希望它锁定在第二个 div 开始的位置。如果屏幕尺寸缩小,那么我希望图像按比例缩小。这可能吗?

这是我正在使用的代码:

https://jsfiddle.net/se5Le7w2/1/

我尝试在外部 div 上使用 position: relative,但它似乎没有达到我想要实现的目的。

  <div style="position: relative;">
<div style="max-width: 975px; width: 100%;">
<img style="position: absolute; z-index: 102; max-width: 975px; width: 100%;" src="http://www.pegaweb.com/tutorials/web-page-header/5.gif">
<img style="position: absolute; z-index: 103; margin-left: 40px; margin-top: 20px;" src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxIREBUTEhIVFhUXGBgYFRYWFRcXGRkaGhcWHhcaGhgYHSggGB4mGxcXIjEiJSkrLi4uGCAzODMtNygtLisBCgoKDg0OGxAQGzcmHx03OC01Ky83NzU3Ny8yNys3NzUxNzcuNzc3OC8vNysvLTAtNS0rKysrLy8rLy8rODUuLf/AABEIAHABwwMBIgACEQEDEQH/xAAcAAEAAgMBAQEAAAAAAAAAAAAABgcDBAUCAQj/xABFEAABAwICBgYGCAUDAwUAAAABAAIDBBESIQUGMUGBkQcTIlFhcRQycqGxsiMzNUJSc5LBNGKCosJTs9EVQ/EXJIOj8P/EABoBAQEAAwEBAAAAAAAAAAAAAAAFAQQGAwL/xAAqEQEAAgECBQMDBQEAAAAAAAAAAQIDBBIFESExsRNBoSIy8BVhcYHRUf/aAAwDAQACEQMRAD8AvFERAWnpLSkNO3FK8NG4bSfIDMrh60a2Np7xxWfLvP3WefefBVxV1T5XF8jy5x2km/8A4HgFU0nDLZY336V+ZTdVxGuKdtOs/CY6U1/dmKeMAfjkzPBoOXEqN1msdXJ607x4NOAf22XKJXglW8ekw4/tqjZNVmyfdZklnc71nOPm4n4rwyoe31XuHk4j4LGSvJK95iHj1dak1mq4vVnefB5xj+66kmiekdwsKmIEfjjyPFpOfA8FAiV4JWrl0mHJ91Wzi1WXH2svjReloalmOGQOG/cR5tOYW6vz9R1skLw+J7mOG9ptwPePAq0tT9dWVVoprMm3Z9mTy7j4KJquH2xfVTrCxptfXJ9N+kpeiIpygIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiA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XPUdtVeWCzJvvD7snn3O8efeqlrqSSF5ZKxzHDaHC3LvHiF+jVz9MaGgq2YJ4w8bjscPJwzCoabX2xxtv1hoajQ1yTur0l+eCV5JVkaa6LXgl1LKCPwS5Hg8DPiB5qH6Q1SrofWppD4sGMf2XVWmqxX7WTL6bLTvDv6qdIDoQIqrE9gybIM3NHc4feHjt81ZGjtJQ1DQ+GRrwfwkEjwI2g+BX5+mge3JzHN9ppHxC+0rJsQMQkxbiwOv/atXPocd/qrPLw2cOsyU+m0c36LRVHooaekt1ZqAO+UNA/+0KX6K1U0jJnW6QeAdscJtcdxeALcBxU6+mine8KFNRN+1ZSeWpa0hpN3HY0ZuPk0Z8dgW9BDvO3u7lg0VoiGmbhhZhv6ziS57j3ue4lzuJW8taeXs2I5+4iIsMiIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAqS1y+0Kj2x8rVdqrHWTU6smrJZY2NLHOu0l7RlYbuCCzI9g8l6XxgyC+oCIiAiIgIiICIiAiIgIiICIvhQeXyNaLkgAbSTYKndddL+m1lou0xto47feN8yPM+4BblTqTpB73XAwlxIvLlYk2yUj1R1G9GkE1Q5r5B6jW3LWnvubXPDJBJNXdGClpo4t7R2j3uObjzXSREBERB//Z">
</div>
<div style="position: relative; width: 100%;">
<table style="width: 100%; max-width: 975px;" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<p style="text-align: justify; font-size: 11px; line-height: 14px; margin: 0px 0px 14px; padding: 0px; color: rgb(0, 0, 0); font-family: Arial, Helvetica, sans; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
1. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce ultrices justo justo, ac consequat arcu pellentesque id. Nulla hendrerit dui vitae neque venenatis consequat. Morbi justo eros, dictum et enim et, pellentesque fermentum augue. Aliquam
non sapien eros. Sed auctor enim ac blandit rhoncus. Vivamus condimentum ex nulla, quis laoreet risus sodales quis. Vivamus interdum aliquam ultricies. Donec consectetur turpis et vehicula hendrerit. Fusce ac dui nec odio convallis malesuada
id ultricies lectus.
</p>
<p style="text-align: justify; font-size: 11px; line-height: 14px; margin: 0px 0px 14px; padding: 0px; color: rgb(0, 0, 0); font-family: Arial, Helvetica, sans; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
2. Nam mi enim, bibendum id porttitor quis, posuere ac arcu. Donec pulvinar enim nec gravida accumsan. Fusce enim risus, laoreet nec venenatis aliquam, feugiat a sapien. Aenean vulputate fermentum ex, at cursus diam cursus vel. Vivamus maximus velit mi,
ut auctor libero hendrerit ut. Donec vel pharetra nulla. Aenean imperdiet elementum felis vel finibus. Aenean eu luctus velit, nec accumsan velit.
</p>
<p style="text-align: justify; font-size: 11px; line-height: 14px; margin: 0px 0px 14px; padding: 0px; color: rgb(0, 0, 0); font-family: Arial, Helvetica, sans; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
3. Nullam pharetra orci nec lacinia bibendum. Ut tortor dolor, feugiat sed nulla ac, ultricies vehicula mi. Donec in arcu tincidunt, convallis lectus eu, ornare eros. Duis mollis ultrices lacus vulputate iaculis. Quisque urna lorem, consectetur in sollicitudin
ut, volutpat et ex. Integer finibus malesuada ipsum, eget consequat nulla interdum et. Maecenas ullamcorper ante turpis, vitae mattis libero ultricies a. Duis bibendum sapien vitae molestie interdum.
</p>
<p style="text-align: justify; font-size: 11px; line-height: 14px; margin: 0px 0px 14px; padding: 0px; color: rgb(0, 0, 0); font-family: Arial, Helvetica, sans; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
4. Vestibulum cursus ipsum augue, eget consequat dui ullamcorper sed. Phasellus a ligula eu tellus posuere tristique quis eu odio. Nullam id est in orci pharetra tempus sed dictum sem. Phasellus vehicula iaculis augue ac scelerisque. Sed pretium eros
sed tortor condimentum viverra. Quisque euismod sed ante eu facilisis. Quisque rhoncus auctor arcu at aliquet. Pellentesque eleifend leo at nisl fringilla sagittis. Sed augue erat, faucibus a nulla at, porttitor volutpat dui.
</p>
<p style="text-align: justify; font-size: 11px; line-height: 14px; margin: 0px 0px 14px; padding: 0px; color: rgb(0, 0, 0); font-family: Arial, Helvetica, sans; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
5. Maecenas semper erat euismod, ultricies augue et, aliquam ipsum. Sed commodo diam a posuere tristique. Vestibulum placerat risus orci, vitae finibus libero vulputate sed. Vestibulum ac nulla maximus, lobortis turpis interdum, tempor lectus. Fusce pretium
scelerisque viverra. Vestibulum aliquam at ex eget sollicitudin. Proin in vehicula velit. Nam eget metus sed dui lobortis pulvinar sit amet sed tortor. Aliquam eu nunc a tortor ultricies euismod.
</p>
</td>

</tr>
<tr>
<td>

<img src="http://www.pegaweb.com/tutorials/web-page-header/5.gif" class="footer" style="width: 100%; max-width: 975px; position: relative; cursor: pointer;">
</td>
</tr>
</table>
</div>
</div>

最佳答案

我会评论而不是回答,但我的声誉还不够高。

您嵌套了过多不必要的元素。 table 元素不应用于布局页面。仅在需要时使用 div。对于我在你的 fiddle 中看到的,你只需要几个 div,也许只需要 2 个。

此外,不推荐使用内联 CSS。使用外部文件。

我知道这不是你要找的答案,但事情就是这样,只要你有这种不必要的复杂性,就没有人会试图帮助你。

关于html - 当其中有绝对定位时,如何让这些 div 正确堆叠?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36186514/

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