美文网首页
添加收货地址展示

添加收货地址展示

作者: 有备而来的王 | 来源:发表于2019-02-22 16:40 被阅读0次

效果图


image.png

关于switch开关,主要在于将checkbox的-webkit-appearance属性设置为none,其他都是样式的调整
1.html

<div>
            <div class="block"></div>
            <div class="address_content">
                <ul>
                    <li>
                        <label>收货人姓名</label><input type="text" placeholder="请输入收货人姓名" id="" value="" />
                    </li>
                    <li>
                        <label>手机号</label><input type="text" placeholder="请输入收货人姓名" id="" value="" />
                    </li>
                    <li>
                        <label>邮政编码</label><input type="text" placeholder="请输入邮政编码" id="" value="" />
                    </li>
                </ul>
            </div>
            <div class="block"></div>
            <div class="address_content_1">
                <ul>
                    <li>
                        <label>所在地区</label><img src="img/right.png" class="right_iccon"/><span class="select">请选择</span>
                    </li>
                    <li style="height: 80px;">
                        <label>详细地址</label><textarea name="" placeholder="请输入详细地址信息,如道路、门牌号、小区、楼栋号、单元室等"></textarea>
                    </li>
                    <li>
                        <label>设置默认地址</label><label style="float: right;width: 60px;height: 30px;margin-right: 15px;"><input type="checkbox" checked="checked" class="switch location" name="" id="" value="" /></label>
                    </li>
                </ul>
            </div>
            <div class="comfirmBtn">
                确定
            </div>
        </div>

2.css

.address_content{
    padding-left: 10px;
}
.address_content ul{
    margin: 0;
    padding: 0;
    list-style: none;
}
.address_content ul li{
    height: 60px;
    line-height: 60px;
    border-bottom: 1px solid #E4E4E4;
}
.address_content_1{
    padding-left: 10px;
}
.address_content_1 ul{
    margin: 0;
    padding: 0;
    list-style: none;
}
.address_content_1 ul li{
    height: 60px;
    line-height: 60px;
    border-bottom: 1px solid #E4E4E4;
}
.address_content label{
    font-size: 14px;
    width: 110px;
    display: inline-block;
}
.address_content_1 label{
    font-size: 14px;
    width: 110px;
    display: inline-block;
}
.block{
    width: 100%;
    height: 10px;
    background-color: #F5F5F5;
}
.comfirmBtn{
    width: calc(100% - 40px);
    height: 50px;
    line-height: 50px;
    border-radius: 4px;
    text-align: center;
    background-color: royalblue;
    margin-top: 20px;
    margin-left: 20px;
    color: white;
    font-size: 18px;
}
.address_content input{
    line-height: 30px;
    height: 30px;
    border: none;
    box-sizing: border-box; 
    width: calc(100% - 110px);
    font-size: 13px;
    border-radius: 3px;
}
.address_content input:focus { 
    outline: none;
    border: none;
}
.address_content_1 textarea{
    line-height: 25px;
    height: 60px;
    border: none;
    box-sizing: border-box; 
    width: calc(100% - 110px);
    font-size: 14px;
    border-radius: 3px;
    float: right;
    padding: 5px 0px;
    margin-top: 10px;
}
.address_content_1 textarea:focus { 
    outline: none;
    border: none;
}
.right_iccon{
    width: 20px;
    height: 20px;
    vertical-align:middle;
    float:right;
    margin-top: 20px;
    margin-right: 15px;
}
.select{
    float:right;
    margin-right: 5px;
    color: #a9a9a9;
    font-size: 14px;
}
.address_detail{
    height: 80px;
}
.switch{
    width: 60px;
    height: 30px;
    border-radius: 20px;
    -webkit-appearance: none;
    user-select: none;
    outline: none; 
    background-color: #e0e0e0;
    box-shadow: #c2c2c2 0 0 0 0 inset;
    position: relative;
    transition:0.4s;
}
.switch:before{
    content: '';
    width: 28px;
    height: 28px;
    border-radius: 100%;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); 
    position: absolute;
    left:0;
    top:1px;
    transition:0.3s;
}
.switch:checked{
    border-color: royalblue;
    background-color: royalblue; 
}
.switch:checked:before{
    left:32px;
}
.location{
    margin: 15px 15px 15px 0px;
}

相关文章

  • 添加收货地址展示

    效果图 关于switch开关,主要在于将checkbox的-webkit-appearance属性设置为none,...

  • 【前端小程序】06 - 购物车页面

    1. 添加收货地址按钮 1.1 页面结构与样式 页面结构: 页面样式: 1.2 处理添加收货地址事件 点击添加收货...

  • iOS电商项目之收货地址

    收货地址分为设置默认地址、编辑地址、删除地址、添加地址 设为默认、删除地址 �编辑地址 �添加地址 想要系统,具体...

  • 收货地址

    我的淘宝里,留着这个收货地址。 从它存在的那天起,日子已经过了一千八百七十七。 北京市丰台区分钟寺枣林街枣林公寓三...

  • 收货地址

    弟弟在路上看到有个抽奖活动,过去随 意抽了一下,抽到了一只iPhone12! 说是留下地址送过上门,结果一个月过去...

  • SSM框架学习日记(7)——收货地址模块

    收货地址 增上改查功能依旧,先新建Controller,Service 添加地址 在参数里直接传shipping对...

  • 无标题文章

    小懒猫虚拟超市这款产品分三个主要页面首页超市页面 我们有定位功能 新增收货地址 添加删除收货地址 显示附近超市列表...

  • 【京东收货地址】

    导读 目前大多数APP的地址选择是用系统的picker View,也不乏用tableview自定义的.这里分享一个...

  • Swift4.2 封装仿京东、淘宝地址选择器WMAddressP

    项目中有添加收货地址功能,由于刚进行Swift开发,没有存货,系统的PickerView界面太过于... 你懂的,...

  • 简单仿淘宝收货地址选择器

    项目中有用到地址选择器的,之前都是用的pickerView,使用下来用户体验并不好,所以就仿照淘宝的添加收货地址写...

网友评论

      本文标题:添加收货地址展示

      本文链接:https://www.haomeiwen.com/subject/cbieyqtx.html