外卖界面(上)

静态点餐界面
要想学好前端,写界面是必不可少的,没事就得多练,多敲,好记性不如烂笔头,记十遍都不如上手敲一遍,今天用花了点时间写了一个app点外卖,没啥技术可言就是练练,等后面来实现功能。

外卖界面(上)_第1张图片
html代码:




    
    
    
    美食香坊
    
    


    

品牌外卖香坊

蜂鸟专送/38分钟送达

在线支付满28减5,满50减10
5个>
公告 其原料秘方其烹饪原料秘料秘料秘方其烹饪原料秘方...>
  • 商品
  • 评价
  • 商家
  • 热销榜
  • 单人套餐
  • 特色粥品
  • 精选热菜
  • 爽口凉菜
  • 半成品
  • 饭类
  • 面类
  • 热销榜

    皮蛋瘦肉粥配包子套餐

    咸粥
    月售1132份 好评率100%
    2428
  • 皮蛋瘦肉粥配包子套餐

    咸粥
    月售1132份 好评率100%
    22
  • 皮蛋瘦肉粥配包子套餐

    咸粥
    月售1132份 好评率100%
    20
  • 皮蛋瘦肉粥配包子套餐

    咸粥
    月售1132份 好评率100%
    18
  • 皮蛋瘦肉粥配包子套餐

    咸粥
    月售1132份 好评率100%
    24
0

另需配送费4元

20起送

css代码:

@media screen and (max-width:375px){
    *{       
        box-sizing: border-box
    }
    body,ul,li,h4,p{
        margin: 0;
        padding: 0;
    }
    body{
        background: #F4F5F7;
    }
    li{
        list-style: none;
    }
    .head{
        width: 100%;
        height: 190px;
    }
    .bgimg{
        position: relative;
        width:100%;
        height: 150px;
        background:url(../img/w1.jpg) no-repeat -50px center;           
    }
    .bgimg:after{
        content:"";
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        background: rgba(0, 0, 0, .5);
        z-index: 5;
    }
    .title{
        width: 75%;
        height: 60%;
        position: absolute;
        z-index: 6;
        top: 25px;
        left: 20px;        
    }
    .title .pic1{
        width: 90px;
        height: 70px;
        float: left;
        border-radius: 5px;
    }
    .title .pic1 img{
        width: 100%;
        height: 100%;
        vertical-align: middle;
    }
    .title .info{
        float: left;
        margin-left: 10px;
    }
    .title h4{
        line-height: 1.75;
    }
    .title .info h4,.title .info p,.title .info span{
        color: #fff;
    }
    .title .info span{
        font-size: 12px
    }
    .title .info .pp{        
        background: rgb(241, 12, 12);
        margin-right: 5px;
        padding: 2px;
    }    
    .title .info p{
        font-size: 14px;
    }
    .title .info .jian{
        background: #fff;
        margin-right: 5px;
        color: red;
    } 
    .five{
        position: absolute;
        right: 10px;
        top: 70px;
        width: 48px;
        height: 26px;
        border-radius: 20px;
        background: rgba(0, 0, 0, .5);
        z-index: 6;
        padding:2px 8px;
    }
    .five sapn{
        color: #fff;
       font-size: 12px      
    }
    .notice{
        position: absolute;
        bottom: 0;
        width: 100%;
        height: 30px;       
        background: rgba(0, 0, 0, .5); 
        color: #fff;
        z-index: 6;
        padding: 3px 10px;
    }
    .notice .gg{
        background: #fff;
        color: #000;
        font-size: 12px;
        border-radius: 2px;
        font-weight: bold;
        padding: 2px
    }
    .notice .notice-info{
        font-size: 12px;
        margin-left: 5px;
        overflow: hidden;      
    }
    .list{
        width: 100%;
        height: 40px;
        line-height: 40px;
        background: #fff;
        display: flex;
        justify-content: space-between;
        border-bottom: 1px solid #ccc;
    }
    .list li{
        float: left;
        width: 33%;
        height: 100%;
        text-align: center;
         
    }
    .list li:nth-child(1){
        color: red;
    }
    main{     
        width: 100%;
        height: 660px;
       overflow: hidden;
    }
    main .good-list{
        margin-top: 30px;
        width: 27%;
        height: 100%;
        padding: 10px;
        float: left;
        background: #fff;
        border-right:1px solid #ccc;
    }
    main .good-list li{
        width: 100%;
        height: 70px;
        color: rgb(65, 64, 64);
        font-weight: bold;
        line-height: 70px;
        text-align: center;
        border-bottom:1px solid #ccc; 
        
    }
    main .good-list .te{
        background: rgb(1, 116, 16);
        color: #fff;
        font-size: 12px;
        padding: 2px;
        border-radius: 2px;
    }
    main .pro-list{
        width: 73%;
        height: 100%;      
        float: left;
        background: #fff;     
    }
    main .pro-list li{
        border-bottom: 1px solid #eee;
    }
    main .pro-list p{
        color: rgb(37, 37, 37);
        
        padding: 5px 10px;
    }
    .pro-info{
        background: #fff;
        width: 100%;
        height: 110px;
        padding: 15px;
    }
    .pro-info .pic2{      
        background: url(../img/w2.jpg) no-repeat;     
     }  
     .pro-info .pic3{ 
        background: url(../img/w3.jpg) no-repeat;      
     }
     .pro-info .pic4{ 
         background: url(../img/w4.jpg) no-repeat;   

      }
      .pro-info .pic5{ 
         background: url(../img/w5.jpg) no-repeat;      
      }
     
    .pro-info .pic2,.pro-info .pic3,.pro-info .pic4,.pro-info .pic5{
        width: 60px;
        height: 60px;
        float: left;
        margin-top: 5px;
        background-size: cover;  
        background-position: -12px center;
    }
    
    .pro-info .details{
        float: left;
       margin-left: 10px;
    }
    .pro-info .details p{
        height: 18px;
        color: #000;
        font-weight: bold;
        padding: 0;
        font-size: 14px;
    }
    .pro-info .details span{      
        font-size: 12px;
        color: #aaa;
    }
    .pro-info .details .price{
        font-size: 16px;
        font-weight: bold;
        color: red;
    }
    .pro-info .details .yuan{
        font-size: 12px;
        font-weight: bold;
        color: #aaa;
        margin-left: 5px;
       
    }
    .pro-info .jiaru{
        float: right;
        margin-top: 60px;
    }
    
    .pro-info .jiaru .icon-add{
        font-size: 20px;
        color: red;  
    }
    footer{
        
        width: 100%;
        height: 60px;
        background: #131D26;
        bottom: 0;
        position: fixed;
    }
    footer:after{
        content: "";
        clear: both;
        display: block;
        width: 60px;
        height: 60px;
        background: #121C25;
        border-radius: 50%;
        top: -15px;
        left: 18px;
        position: absolute;
        z-index: 5;
    }
    footer .zj{
        width: 33%;
        padding: 0px 10px;
        height: 30px;
        line-height: 30px;
        margin-top: 15px;
        border-right: 1px solid #81858A;
        text-align: right;
        float: left;
        color: #81858A;
    }
    footer .zj .shopping{
        width: 50px;
        height: 50px;
        background: #2B343D;
        border-radius: 50%;
        position: absolute;
        top: -8px;
        left: 23px;
        z-index: 6;
    }
    footer .zj .shopping .icon-qicheqianlian-1-copy{
        position: absolute;
        left: 8px;
        top: 10px;
        font-size: 34px;
        color: #eee;
    }
    footer .zj span{
        font-size: 18px; 
        font-weight: bold;
    }
    footer .zj span .icon-icon-price-sure{
        font-size: 22px;
    }
    footer .ps{
        font-size: 14px; 
        width: 40%;
        padding: 0px 10px;
        height: 30px;
        line-height: 30px;
        margin-top: 15px;
        text-align: left;
        float: left;
        color: #81858A;
    }
    footer .qs{
        float: left;
        width: 27%;
        height: 60px;
        line-height: 60px;
        text-align: center;
        color: #81858A;
        background: #2B343B;
    }
    footer .qs .icon-icon-price-sure{
        font-size: 20px;
    }
}


做的小屏375分辨率的,主要写的就是html和css,图片那些网上可以找,然后就先到此位置吧,脖子都僵硬了~~

你可能感兴趣的:(CSS,HTML)