xiaoxiaoxun

小程序制作表格

wxml:

 <view class=\'history-table-wrap\'>
    <view class="table">
      <view class="tr">
          <view class="th th1">日期</view>
          <view class="th th2">时间</view>
          <view class="th th3">伤害</view>
      </view>
      <view class="tr" wx:for="{{15}}">
          <view class="td td1">2018/02/12</view>
          <view class="td td2">11:30</view>
          <view class="td td3">本次对海煞造成了100000点伤害</view>
      </view>
    </view>
 </view>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
wxss:

.history-table-wrap{
  position: absolute;
  width: 668rpx;
  height: 578rpx;
  left: 50%;
  margin-left: -334rpx;
  top: 70rpx;
  overflow-y: scroll;
  overflow-x: hidden;
}
/* 表格代码   */
.table{
  border:1px solid #dadada;
  border-right:0;
  border-bottom: 0;
  width: 98%;
  margin-left: 1%;
}
.tr{
  width:100%;
  display: flex;
  justify-content: space-between;
}
.th,.td{
  padding: 10px;
  border-bottom: 1px solid #dadada;
  border-right: 1px solid #dadada;
  text-align: center;
  width: 100%;
}
.th1,.th2,.td1,.td2{
  width: 40%;
}
.th{
  font-weight: 800;
  background-color: #b66242;
  font-size: 28rpx;
  color: #330e0e;
}
.td{
  font-size: 20rpx;
  color: #ec9480;
}

 

发表于 2020-04-03 17:43  z_xun  阅读(2057)  评论(0编辑  收藏  举报
 

分类:

技术点:

相关文章:

  • 2022-03-04
  • 2022-03-11
  • 2022-03-11
  • 2021-11-29
  • 2021-08-02
  • 2021-04-26
  • 2021-11-23
  • 2022-02-03
猜你喜欢
  • 2021-07-25
  • 2021-11-20
  • 2022-01-08
  • 2021-11-21
  • 2021-12-10
  • 2022-01-19
  • 2021-05-11
相关资源
相似解决方案