Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/42.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
HTML CSS:固定元素,将高度调整为顶部_Html_Css - Fatal编程技术网

HTML CSS:固定元素,将高度调整为顶部

HTML CSS:固定元素,将高度调整为顶部,html,css,Html,Css,我在页面底部的固定位置有一个DIV 问题:如果这个Div-Box中的元素被包裹(响应),Div-Box的高度会一直增长到底部,所以我看不到其他元素 因此,我尝试根据“TOP”来调整div元素的高度 EG:[++++++++++++++++++++++]对不起,已经找到我的答案了:D position: fixed; overflow: hidden; bottom: 0; 不要使用margintop:calc(100vh-245px)(将其删除),但对于这样的页脚类型的固定元素,只能使用bot

我在页面底部的固定位置有一个DIV

问题:如果这个Div-Box中的元素被包裹(响应),Div-Box的高度会一直增长到底部,所以我看不到其他元素

因此,我尝试根据“TOP”来调整div元素的高度


EG:[++++++++++++++++++++++]对不起,已经找到我的答案了:D

position: fixed; overflow: hidden; bottom: 0;

不要使用
margintop:calc(100vh-245px)
(将其删除),但对于这样的页脚类型的固定元素,只能使用
bottom:0
。如果您愿意,您可以使用
height:245px
(显然这是您想要的高度),但您不必这样做。如果没有,高度将取决于元素的内容和填充设置。

您应该添加代码以获得更多说明。是的,请添加您尝试过的HTML和CSS,我们可以帮助您更好地理解。当然,希望现在一切正常
    <div class="row d-inline-flex" id="bT_dragSystem" style="position: fixed;width: 100vw;z-index: 1;margin: 0;margin-top: calc(100vh - 245px);background: rgba(51,0,255,0.17);padding: 5px;padding-left: 10px;margin-left: -10px;">
        <div class="col" id="bT_dragSection" style="padding: 0;">
            <ul class="d-flex justify-content-center align-items-center align-self-center flex-wrap" id="drag_formElements" style="padding: 0;height: 100%;">
               <li> Elements
position: fixed; overflow: hidden; bottom: 0;