gpt4 book ai didi

jquery - 如何将按钮放在数据库内容下

转载 作者:太空宇宙 更新时间:2023-11-04 01:36:08 25 4
gpt4 key购买 nike

我有一个 css 的问题,我从数据库中生成了这些内容,所以我希望在在线版本上,会生成这么多内容,所以为了使应用程序运行得更快更好,同时也为了防止浏览器由于加载了太多数据而崩溃,我将结果限制为 8,然后我放置了一个添加更多按钮,但我希​​望这个添加更多按钮保留在生成的内容下方,即使我使用 ajax 删除产品它也应该自动向上移动这是按钮的当前状态 the button moves on top which i know is caused by position:absolute现在我如何将它像页脚一样放在我的页面下面但不粘 因为如果我使用 bottom:0 它会放置但是如果内容少于 8 从数据库生成的内容,按钮远离主要内容。更像是 instagram 加载更多按钮,该按钮位于页面底部。这是我的按钮代码

  <button class="btn" id="zuan" style="background: #3897f0!important; position: absolute;text-align: center;margin-left:-45%;outline:none!important;  margin-bottom:25px;  border: 0px!important;     color: #fff!important;     padding: 12px 24px!important;border-radius:0px;">LOAD MORE</button>

最佳答案

我终于找到了解决方法,这就是解决方案。即使页面内容很短,这也会将页脚放置在页面下方。

<button class="btn" id="zuan">LOAD MORE</button>
<br/>
<style>


html {
height: 100%;
box-sizing: border-box;
}

*,
*:before,
*:after {
box-sizing: inherit;
}
body {
position: relative;
padding-bottom: 6rem;
min-height: 100%;
}


#zuan{
position: absolute;
background-color: #3897f0;
outline:none!important;
border: 0px!important;
color: #fff!important;
border-radius:0px;
padding: 12px 24px!important;
margin-left:-45%;
bottom: -100;
padding: 1rem;
text-align: center;
margin-bottom:30px;
}
</style>

关于jquery - 如何将按钮放在数据库内容下,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46213932/

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