Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/73.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 粘性页脚不';行不通_Html_Css_Footer - Fatal编程技术网

Html 粘性页脚不';行不通

Html 粘性页脚不';行不通,html,css,footer,Html,Css,Footer,嗨,我知道以前有很多关于这个的问题,但我似乎找不到我的页脚问题 但当我向下滚动时,我的页脚是否与加载页面时保持在同一位置。有办法解决这个问题吗 正文{ 字体系列:投石机MS,Verdana,Arial,Helvetica,无衬线; 线高:24px; 字体大小:12px; 背景色:#FF3333; 身高:100%; } h1{ 颜色:#777777; 字体大小:正常; 字号:19px; 文本转换:大写; 边框底部:3px#DDDDDD实心; 填充:3px0px; 左边距:5px; } p{ 显示

嗨,我知道以前有很多关于这个的问题,但我似乎找不到我的页脚问题

但当我向下滚动时,我的页脚是否与加载页面时保持在同一位置。有办法解决这个问题吗

正文{
字体系列:投石机MS,Verdana,Arial,Helvetica,无衬线;
线高:24px;
字体大小:12px;
背景色:#FF3333;
身高:100%;
}
h1{
颜色:#777777;
字体大小:正常;
字号:19px;
文本转换:大写;
边框底部:3px#DDDDDD实心;
填充:3px0px;
左边距:5px;
}
p{
显示:块;
-之前的webkit保证金:1em;
-webkit后的页边距:1em;
-webkit保证金开始:0px;
-webkit页边距结束:0px;
左边距:5px;
字号:1.5em;
}
氢{
显示:块;
字号:1.5em;
-之前的webkit保证金:0.83em;
-之后的webkit保证金:0.83em;
-webkit保证金开始:0px;
-webkit页边距结束:0px;
字体大小:粗体;
左边距:5px;
}
.标志{
位置:绝对位置;
垫底:5px;
右边填充:10px;
顶部:20px;
右:20px;
}	
形式{
利润率:0px22%-1rem;
背景色:白色;
最小高度:100%;
边缘底部:-60px;
}
#主导航{
左边距:5px;
}
.GridViewEditRow{
宽度:100%;
}
body、html{/*body和html必须为100%才能向下推标头*/
身高:100%;
宽度:100%;
}
body>#wrapper{/*所有内容都必须被包装…#wrapper是我的id。位置相对重要*/
位置:相对位置;
高度:自动;
最小高度:100%;
}
#标题{
高度:100px;
背景:rgba(255255,0.2);
}
#内容包装{/*#内容包装是不带页眉或页脚的内容的包装| padding bottom=页脚高度*/
填充底部:100px;
}
#页脚{/*位置必须为绝对位置,底部必须为0*/
高度:100px;
宽度:100%;
背景:rgba(255255,0.2);
位置:绝对位置;
底部:0;
}

加油!
#容器{
高度:506px;
边际上限:0px;
}
SvShop


&复制SvShop-门Demey Thimo 6ITN-位于opdracht van De Jaeger Els
我删除了“#”,因为它不是id

footer { 
    height: 100px;
    width: 100%;
    background: rgba(255,255,255,0.2);
    position: absolute;
    bottom: 0;
}
我删除了“#”,因为它不是一个id

footer { 
    height: 100px;
    width: 100%;
    background: rgba(255,255,255,0.2);
    position: absolute;
    bottom: 0;
}
看看,它可能包含一些代码,如果您想要一个粘性页脚,您可能会感兴趣。否则,技巧是固定最小高度和边距值,如下所示:

min-height: 100%; // This sends your footer at the bottom of your page
margin-bottom: -X em; // Where X is the height of your footer, em recommended
看看,它可能包含一些代码,如果您想要一个粘性页脚,您可能会感兴趣。否则,技巧是固定最小高度和边距值,如下所示:

min-height: 100%; // This sends your footer at the bottom of your page
margin-bottom: -X em; // Where X is the height of your footer, em recommended

这段代码适用于我的页脚。谢谢所有帮助我的人

html {
position: relative;
min-height: 100%;}

form {
margin: 0px 22% -1rem ;
background-color: white;
min-height: 100%;
margin-bottom: -1em;}

footer {
border-top: 2px solid red;
border-bottom: 2px solid red;
color: black;
background-color: lightgrey;
font-size: 1em;
text-align: center;
padding: 1em;
position: absolute;
left: 0;
bottom: 0;
width: 100%;}

body {
font-family: Trebuchet MS, Verdana, Arial, Helvetica, sans-serif;
line-height: 24px;
font-size: 12px;
background-color: #FF3333;
margin: 0 0 100px;
height: 100%;}

这段代码适用于我的页脚。谢谢所有帮助我的人

html {
position: relative;
min-height: 100%;}

form {
margin: 0px 22% -1rem ;
background-color: white;
min-height: 100%;
margin-bottom: -1em;}

footer {
border-top: 2px solid red;
border-bottom: 2px solid red;
color: black;
background-color: lightgrey;
font-size: 1em;
text-align: center;
padding: 1em;
position: absolute;
left: 0;
bottom: 0;
width: 100%;}

body {
font-family: Trebuchet MS, Verdana, Arial, Helvetica, sans-serif;
line-height: 24px;
font-size: 12px;
background-color: #FF3333;
margin: 0 0 100px;
height: 100%;}

我是否必须将其添加到我的
表单
或我的
页脚
?如果您想使页脚变粘,我建议您将其添加到
页脚
的css中。好的,我已经这样做了,但现在当我必须向下滚动时,它是否位于我的表单后面。我将在问题中添加一张图片。我是否必须将其添加到我的
表单
或我的
页脚
?由于您希望页脚具有粘性,我建议您将其添加到
页脚
的css中。好的,我已经这样做了,但现在当我必须向下滚动时,它是否位于我的表单后面。我将在问题中添加一幅图片。