简体   繁体   English

缩放时如何使绝对底部容器保持静止?

[英]How can I make my absolute bottom container stay still when zooming?

I was wondering how I can stop this bottom text from moving around when someone zooms in or out. 我想知道当有人放大或缩小时如何阻止这些底部文本移动。 The rest of the page so far stays still but because I have had to use position:absolute to make this particular section stay at the bottom of another div (content), it now moves. 到目前为止,页面的其余部分保持静止,但是由于我不得不使用position:absolute来使此特定部分停留在另一个div(内容)的底部,因此它现在可以移动了。

#content {
border: 2px solid;
border-radius: 10px;
border-color:#ffffff;
box-shadow: 3px 3px 3px #999999;
}

#bottomsectioncontainer {
position:absolute;
bottom:0;
padding-left:200px;
padding-right:275px;
}
<div id="container2" style="width:1300px; height;975px; margin:auto">

<div id="content" style="background-color:#ffffff; height:975px";>

<!---content--->

<div id="bottomsectioncontainer" style="height: 5px; margin:auto;">


<div id="bottom1" style="width: 250px; float:left">


<h4 class="h4"> Example </h4>
<p class=bottompara>One thing <br>
Two Thing<br>
Three thing<br>
Four Thing<br>
Five Thing<br>
</p>

</div>


<div id="bottom2" style="width: 250px;float:left">

<h4 class="h4"> Example </h4>
<p class=bottompara>One thing <br>
Two Thing<br>
Three thing<br>
Four Thing<br>
Five Thing<br>
</p>


</div>

<div id="bottom3" style="width: 250px; float:left;">

<h4 class="h4"> Example </h4>
<p class="bottompara">One thing <br>
Two Thing<br>
Three thing<br>
Four Thing<br>
Five Thing<br>
</p>


</div>

</div>
</div>



</body>

</html>

http://tinypic.com/r/wwi35l/8 http://tinypic.com/r/wwi35l/8

position:relative;

in #content it will fix that problem #content ,它将解决该问题

and also remove height:5px from bottomcontainer 并从底部容器中删除height:5px

#content {
    position:relative;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使页脚停留在页面底部? - How do I make my footer stay at the bottom of my page? 调整窗口大小后如何使我的网站停留 - How can I make my website stay when window is resized 我如何使我的PHP包括停留在底部? - How to I make my php include stay at the bottom? 放大/缩小时如何使阴影盒保持在同一位置? - how to make a shadowbox stay in the same place when zooming in/out? 如何使我的删除按钮反应灵敏并在缩略图上保持绝对 - How to make my delete buttons responsive and stay absolute on my thumbnails 我可以将jQuery工具提示停留在光标上方时吗? - Can I make this jQuery tooltip stay on when my cursor is over it? 如何使页脚停留在CSS的页面底部而不重叠 - How do i make my footer stay at the bottom of my page in CSS without overlapping HTML / CSS:如何在放大时使复选框增大,在缩小时如何缩小? - HTML/CSS: how can I make the checkboxes grow when zooming in and shrink when zooming out? 导航到新页面时,如何使切换开关保持在当前位置? - How can I make my toggle switches stay in their current positions when navigating to new pages? 每次按添加时,如何让我的按钮停留在文本框的底部? - How do I make my button stay at the bottom of the textbox everytime I press add?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM