小编Sim*_*sen的帖子

CSS - 粘性页脚

这个似乎有很多已解决的问题,但它们似乎都不适合我......

我已经创建了这个小jsfiddle来向你展示:jsfiddle页脚

而CSS:

.footer {
     width:798px;
     border-top: 2px solid #2E181A;
     clear: both;
     padding: 5px 0 0 0;
     background-color: inherit;
     text-align: center;
     bottom:0;
     background-color: #E6D9BD;
     position:relative;
     height: 30px;
     margin: -30px auto 2px auto;
     z-index:30;
 }

 .container {
     width: 788px;
     margin: 0px auto 0px auto;
     padding: 0px 0px 30px 0px;
     border:5px solid #2E181A;
     background-color: #E6D9BD;
     min-height: 100%;
     position:relative;
     content: " "; /* 1 */
     display: table; /* 2 */
 }

 .contentleft {
     background-color: inherit;
     margin:5px 10px 10px 10px;
     padding:10px 5px 30px …
Run Code Online (Sandbox Code Playgroud)

html css sticky footer

5
推荐指数
1
解决办法
3150
查看次数

标签 统计

css ×1

footer ×1

html ×1

sticky ×1