2 qq 36168113 qq_36168113 于 2016.09.18 16:01 提问

当页面内容的高度不满手机屏幕时,footer Div会消失,请指点

当页面内容的高度不满手机屏幕时,footer Div会消失,并且不知道怎么解决,请各位大神指点。
未满一屏,底部菜单栏不显示
超出一屏,底部菜单栏正常显示

 <!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>二维码</title>
<link  type="text/css" rel="stylesheet" href="../iquan/css/style.css?t=2" />
<meta name="viewport" content="width=device-width">
</head>

<body style="position:relative">
<div class="wrapper">
    <div class="header_title">
        <a href="#">
            <div class="header_title_btn"><img src="/iquan/images/fengcai/fanhui.png" /></div>
        </a>
        <div class="header_title_text_groupon">二维码</div>
    </div>
    <div class="acticle">
        <div class="QR_Code_content">
            <p>夏日装扮大酬宾<br><span>加菲猫美甲店</span></p>
            <img src="/iquan/images/groupon/QR-Code.png">
        </div>
        <!--<div class="bgcolor2"></div>-->
    </div>

    <div class="footer_activity_groupon_t"  >
        <a href="#"><div class="footer_QR_Code">
            <img src="/iquan/images/groupon/pic_download.png" >
        </div></a>
    </div>
    <div class="footer_activity_place_holder"></div>
</div>
</body>
</html>
-----------------css----------------------!
.footer_activity_groupon_t{
    max-width:1080px;
    width:1080px;
    margin:auto 0px 0px 0px;
    height:141px;
    padding:0px;
    position:fixed;
    bottom:0;
    color:#575757;}

2个回答

qq_36168113
qq_36168113   2016.09.19 16:42

有没有大神来指点一下

quasimodo_es
quasimodo_es   2016.09.20 17:35

供你参考,手机中设置页面自适应宽度即可

 <html>
<head>
    <title></title>
    <style type="text/css">

        html,body {
            overflow:hidden;
            margin:0px;
            width:100%;
            height:100%;
        }

        .virtual_body {
            width:100%;
            height:100%;
            overflow-y:scroll;
            overflow-x:auto;
        }

        .fixed_div {
            position:absolute;
            z-index:2008;
            bottom:20px;
            left:0px;
            width:100%;
            height:40px;
            border:1px solid red;
            background:#e5e5e5;
        }
    </style>
</head>

<body>
<div class="fixed_div">I am still here!</div>

<div class="virtual_body">
    <div style="height:1888px;">
        I am content !
    </div>
</div>
</body>
</html> 
Csdn user default icon
上传中...
上传图片
插入图片