解决普遍pc端公共底部永远在下面框架

<div style="width: 90%;height: 3000px;margin: 0 auto; background: red;"></div>
     <div class="footer">
     <div class="son">sssssssssssssssssssssss</div>
</div>
    *{
                     margin: 0;
                     padding: 0;
                }
                html,
                body {
                     /*height: 100%;*/
                     min-height: 100%;
                     position: relative;
                }
                
                body {
                     /*padding-bottom: 298px;*/
                     box-sizing: border-box;
                     padding-bottom: 120px;
                }
                
                html {
                     height: 100%;
                }
                
                .footer {
                     width: 100%;
                     position: absolute;
                     left: 0;
                     bottom: 0;
                }
                .son{
                     width: 100%;
                     height: 100px;
                     background: red;
                }

 

猜你喜欢

转载自www.cnblogs.com/chen527/p/9591778.html