移动端布局,底部的div被挤下去,麻烦帮看看

上代码

<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<head>
    <meta charset="UTF-8">
    <title>1</title>
    <style>
        * {
            margin: 0px;
            padding: 0px;
        }
        
        html {
            height: 100%;
        }
        
        body {
            min-height: 100%;
            display: flex;
            flex-direction: column;
        }
        
        .content {
            flex: 1;
        }
        
        .wp {
            height: 200px;
            background-color: pink;
        }
        
        .footer {
            position: fixed;
            bottom: 100px;
            white-space: nowrap;
            overflow-x: scroll;
            overflow-y: hidden;
            text-align: center;
            line-height: 60px;
            background-color: #DEDEDE;
            width: 100%;
            height: 60px;
        }
        
        .nav {
            display: inline-block;
            width: 200px;
            height: 60px;
            border-right-style: solid;
            border-right-width: 1px;
            border-right-color: #EEEEEE;
        }
        
        .image {
            width: 62px;
            height: 60px;
        }
    </style>
</head>

<body>
    <div class="content">
        <div class="wp">测试</div>
        <div class="wp">测试</div>
        <div class="wp">测试</div>
        <div class="wp">测试</div>
        <div class="wp">测试</div>
        <div class="wp">测试</div>
        <div class="wp">测试</div>

    </div>
    <div class="footer">
        <img src="./image/list.png" alt="" class="image">
        <div class="nav">测试模块</div>
        <div class="nav">测试模块</div>
        <div class="nav">测试模块</div>
        <div class="nav">测试模块</div>
        <div class="nav">测试模块</div>
        <div class="nav">测试模块</div>
        <div class="nav">测试模块</div>

    </div>
</body>

</html>

list.png
image

效果图
image.png

求问大神是啥情况,前端小白求大腿

阅读 1.6k
1 个回答

可以给image加一个vertical-align: middle

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题