HTML+CSS练习 移动端less

index.less

// out: ../css/
// 导出当前less到index.css

// 导入当前bass.less
@import "./base.less";


@fontSize: 37.5rem;

header{
    display: flex;
    justify-content: space-between;
    padding: 0 (15 / @fontSize);
    height: (44 / @fontSize);
    line-height: (44 / @fontSize);

    .iconfont{
        // background-color: red;
        width: (34 / @fontSize);
        font-size: (25 / @fontSize);
        line-height: (44 / @fontSize);
    }

        h3{
        // background-color: red;
        font-size: (17 / @fontSize);
        line-height: (44 / @fontSize);
    }

        .note{
        // background-color: #2CB5A5;
        color: #2CB5A5;
        font-size: (15 / @fontSize);
        line-height: (44 / @fontSize);
    }
}
.banner{
    text-align: center;
    margin-top: (30 / @fontSize);
    margin-bottom: (76 / @fontSize);
    img{
        width: (240 / @fontSize);
        height: (206 / @fontSize);
        margin-bottom: (18 / @fontSize);
    }
    p{
        font-size: (16 / @fontSize);
    }
    span{
        color: #16C2A3;
    }
}

.bottom{
    ul{
        li{
        width: (345 / @fontSize);
        height: (78 / @fontSize);
        border: (0.5 / @fontSize) solid #EDEDED;
        border-radius: (4 / @fontSize);
        margin-bottom: (15 / @fontSize);
        
        margin: (15 / @fontSize);
        // background-color: red;
        
        a{
            display: flex;
            img{
                width: (40 / @fontSize);
                height: (40 / @fontSize);
                margin: (19 / @fontSize) (15 / @fontSize);
                // background-color: aqua;
            }
            .text{
                flex: 1;
                h3{
                    color: #3C3E42;
                    font-size: (16 / @fontSize);
                    line-height: (24 / @fontSize);
                    text-align: left;
                    // background-color: aqua;
                    margin-top: (15 / @fontSize);
                    margin-bottom: (4 / @fontSize);
                }
                p{
                    color: #848484;
                    font-size: (13 / @fontSize);
                    line-height: (20 / @fontSize);
                    text-align: left;

                }
            }
            .icon{
                font-size: (17 / @fontSize);
                width: (17 / @fontSize);
                height: (17 / @fontSize);
                margin: (33 / @fontSize) (17 / @fontSize);
            }
        }

        
        }
    }
}

index.html

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

    <link rel="stylesheet" href="./iconfont/iconfont.css">
    <link rel="stylesheet" href="./css/index.css">

    <title>Document</title>
</head>
<body>
    <header>
        <a href="">
            <div class="iconfont icon-left"></div>
        </a>
        <h3>极速问诊</h3>
        
        <a href="">
            <div class="note">问诊记录</div>
        </a>
    </header>

    <div class="banner">
        <img src="./assets/entry.png" alt="">
        <p><span>20s</span> 快速匹配专业医生</p>
    </div>

    <div class="bottom">
        <ul>
            <li>
                <a href="">
                    <div class="pic">
                        <img src="./assets/type01.png" alt="">
                    </div>
                    <div class="text">
                        <h3>三甲图文问诊</h3>
                        <p>三甲主治及以上级别医生</p>
                    </div>
                    <div class="icon iconfont icon-right"></div>
                </a>
            </li>
            <li>
                <a href="">
                    <div class="pic">
                        <img src="./assets/type02.png" alt="">
                    </div>
                    <div class="text">
                        <h3>普通图文问诊</h3>
                        <p>二甲主治及以上级别医生</p>
                    </div>
                    <div class="icon iconfont icon-right"></div>
                </a>
            </li>
            
        </ul>
    </div>
    <script src="./js/flexible.js"></script>
</body>
</html>

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值