基于HTML弹性布局做的支付宝界面

里面有一些语言图标,想用的可以去iconfont-阿里巴巴矢量图标库里面寻找,这类图标跟文字一样可以设置大小、文本居中之类的,并不算严格意义上的图片,废话不多说,直接上成果和代码

html 复制代码
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../img/语言图标/iconfont.css">
    <style>
        *{
            margin: 0;
            padding: 0;
        }

        .box{
            width: 955px;
            height: 1420px;
            margin: 0 auto;
            /* background: yellow; */
            display: flex;
            flex-direction: column;
        }

        /* header设置 */
        header{
            height: 124px;
            background: #232939;
            display: flex;
            color: white;
        }

        header i.iconfont{
            width: 118px;
            height: 124px;
            line-height: 124px;
            text-align: center;
            font-size: 48px;
        }

        header span{
            font-size: 40px;
            flex: 1;
            height: 124px;
            line-height: 124px;
            /* text-align: center; */
        }

        /* footer设置 */
        footer{
            height: 128px;
            background: gray;
            display: flex;
        }

        footer div{
            flex: 1;
            /* border: 1px solid red;
            box-sizing: border-box; */
            display: flex;
            flex-direction: column;
            justify-content: center;

            color: #acadaf;
            background: white;
        }

        footer div:hover{
            color: #06a9ee;
        }

        footer div i.iconfont{
            height: 66px;
            line-height: 66px;
            text-align: center;
            font-size: 58px;
        }

        footer div span{
            height: 36px;
            line-height: 36px;
            text-align: center;
            font-size: 28px;
        }

        /* section设置 */
        section{
            flex: 1;
            background: #f4f5f9;
        }

        .main{
            display: flex;
            height: 278px;
            justify-content: space-around;
            align-items: center;
            color: white;
            background: #232939;
        }

        .main div{
            width: 120px;
            height: 168px;
            /* background: red; */
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

        .main div i{
            font-size: 110px;
            text-align: center;
        }

        .main div span{
            font-size: 32px;
            text-align: center;
        }

        .list{
            display: flex;
            flex-wrap: wrap;
            background: white;
        }

        .list div{
            width: 25%;
            height: 208px;
            border: 1px solid gray;
            box-sizing: border-box;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }

        .list div i{
            height: 77px;
            line-height: 77px;
            text-align: center;
            font-size: 55px;
            color: green;
        }

        .list div span{
            height: 61px;
            line-height: 61px;
            text-align: center;
            font-size: 30px;
        }
        
        .pic{
            margin-top: 25px;
        }

        .pic img{
            width: 955px;
            height: 221px;
        }


    </style>
</head>
<body>
    <div class="box">
        <header>
            <i class="iconfont icon-iconfonticon1"></i>
            <span>账单</span>
            <i class="iconfont icon-iconfonticon4"></i>
            <i class="iconfont icon-iconfonticon4"></i>
            <i class="iconfont icon-iconfonticon4"></i>
        </header>
        <section>
            <div class="main">
                <div>
                    <i class="iconfont icon-saoyisao"></i>
                    <span>扫一扫</span>
                </div>
                <div>
                    <i class="iconfont icon-saoyisao"></i>
                    <span>扫一扫</span>
                </div>
                <div>
                    <i class="iconfont icon-saoyisao"></i>
                    <span>扫一扫</span>
                </div>
                <div>
                    <i class="iconfont icon-saoyisao"></i>
                    <span>扫一扫</span>
                </div>
            </div>

            <div class="list">
                <div>
                    <i class="iconfont icon-huokuan"></i>
                    <span>贷款</span>
                </div>
                <div>
                    <i class="iconfont icon-huokuan"></i>
                    <span>贷款</span>
                </div>
                <div>
                    <i class="iconfont icon-huokuan"></i>
                    <span>贷款</span>
                </div>
                <div>
                    <i class="iconfont icon-huokuan"></i>
                    <span>贷款</span>
                </div>
                <div>
                    <i class="iconfont icon-huokuan"></i>
                    <span>贷款</span>
                </div>
                <div>
                    <i class="iconfont icon-huokuan"></i>
                    <span>贷款</span>
                </div>
                <div>
                    <i class="iconfont icon-huokuan"></i>
                    <span>贷款</span>
                </div>
                <div>
                    <i class="iconfont icon-huokuan"></i>
                    <span>贷款</span>
                </div>
                <div>
                    <i class="iconfont icon-huokuan"></i>
                    <span>贷款</span>
                </div>
                <div>
                    <i class="iconfont icon-huokuan"></i>
                    <span>贷款</span>
                </div>
                <div>
                    <i class="iconfont icon-huokuan"></i>
                    <span>贷款</span>
                </div>
                <div>
                    <i class="iconfont icon-huokuan"></i>
                    <span>贷款</span>
                </div>
            </div>

            <div class="pic">
                <img src="../img/支付宝01.png" alt="">
            </div>
        </section>
        <footer>
            <div>
                <i class="iconfont icon-jizhangben"></i>
                <span>记账本</span>
            </div>
            <div>
                <i class="iconfont icon-jizhangben"></i>
                <span>记账本</span>
            </div>
            <div>
                <i class="iconfont icon-jizhangben"></i>
                <span>记账本</span>
            </div>
            <div>
                <i class="iconfont icon-jizhangben"></i>
                <span>记账本</span>
            </div>
        </footer>
    </div>
</body>
</html>
相关推荐
用户059540174463 小时前
把前端内存泄漏排查从2小时压到5分钟,我们把它集成进了CI
前端·css
IMPYLH3 小时前
HTML 的 <dd> 元素
前端·html
山内桜良13 小时前
HarmonyOS中,html 与 ets 桥接沟通
华为·html·harmonyos
IMPYLH16 小时前
HTML 的 <data> 元素
前端·html
UndefeatedJie19 小时前
全栈项目架构三支柱:模块化 × RESTful × 语义化HTML,附AI辅助开发心法
html
凌奕20 小时前
Claude Code 上线了"一键发网页"功能:报告做完直接甩链接,部署这一步彻底消失
html·claude
IMPYLH1 天前
HTML 的 <colgroup> 元素
前端·html
姑苏倾城客1 天前
Flutter中,html 与 dart 桥接沟通
javascript·flutter·html
2501_941982051 天前
企业微信外部群内:基于RPA接口的监控系统设计
前端·bootstrap·html
Dlrb12112 天前
信息查询Web服务器-->电子商城信息查询项目
linux·服务器·数据库·html·嵌入式·epoll·数据查询