码迷,mamicode.com
首页 > 其他好文 > 详细

列表页面布局

时间:2020-06-03 12:13:12      阅读:61      评论:0      收藏:0      [点我收藏+]

标签:技术   tle   css   rgba   position   image   osi   ffffff   高度   

技术图片

html

<view class="item">
    <view class="line-date">帮扶日期:2019-12-27</view>
    <view class="line-person">被帮扶人:张三</view>
    <view class="line-title">帮扶主题:企业爱心送温暖,1000元慰问金。</view>
    <view class="tag">企业帮扶</view>
</view>

<view class="item">
    <view class="line-date">帮扶日期:2019-12-27</view>
    <view class="line-person">被帮扶人:张三</view>
    <view class="line-title">帮扶主题:企业爱心送温暖,1000元慰问金。</view>
    <view class="tag">企业帮扶</view>
</view>

css

page {
    background-color: #f6f6f6;
}

.item {
    margin-left: 20rpx;
    margin-right: 20rpx;
    margin-top: 20rpx;
    width: 710rpx;
    height: 225rpx;
    border-radius: 6rpx;
    // border: 1rpx solid red;
    background-color: #ffffff;
    padding-left: 40rpx;
    padding-top: 40rpx;
    position: relative;
    .tag {
        height: 70rpx;
        padding-left:50rpx;
        padding-right: 30rpx;
        background: rgba(78, 135, 241, 1);
        border-radius: 0px 6rpx 0px 50rpx;
        font-size:28rpx;
        line-height: 70rpx;
        font-weight:500;
        color:rgba(255,255,255,1);
        position: absolute;
        right: 0;
        top:0;
    }
    .line-date {
        height: 28rpx;
        line-height: 28rpx;
        font-size: 28rpx;
        font-weight: 500;
        color: #333333;
    }

    .line-person {
        height: 26rpx; /** 高度控制好,否则页面不准 */
        margin-top: 40rpx;
        font-size: 26rpx;
        font-weight: 400;
        color: rgba(51, 51, 51, 1);
        line-height: 26rpx;
    }

    .line-title {
        margin-top: 30rpx;
        font-size: 26rpx;
        font-weight: 400;
        color: rgba(51, 51, 51, 1);
        line-height: 26rpx;
    }
}

列表页面布局

标签:技术   tle   css   rgba   position   image   osi   ffffff   高度   

原文地址:https://www.cnblogs.com/jiqing9006/p/13036601.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!