当前位置: 首页 > news >正文

苏州街网站建设wordpress 文章id更改

苏州街网站建设,wordpress 文章id更改,企业seo策划方案优化案例,32岁学做网站前言 在使用uni-app开发微信小程序过程中,遇到了时间轴布局,由于每项的内容高度不一致,使用uniapp自带的扩展组件uni-steps,样式布局无法对齐竖线,于是自己造轮子,完成特殊的布局。显示效果如下&#xff1…

前言

在使用uni-app开发微信小程序过程中,遇到了时间轴布局,由于每项的内容高度不一致,使用uniapp自带的扩展组件uni-steps,样式布局无法对齐竖线,于是自己造轮子,完成特殊的布局。显示效果如下:

 

 

实现

实现这种布局,有两种实现方式,

第一种:使用css伪类实现;

第二种:使用纯css实现。

具体演示代码

第一种方式:使用css伪类实现。效果如图一

1、样式文件

<style scoped lang="scss">
.timeline{margin: 64rpx auto 0rpx auto;position: relative;width: 100%;&:before{background-color: #6DD1C9;content: '';margin-left: -1rpx;position: absolute;top: 0rpx;left: 14rpx;width: 2rpx;bottom: -250rpx;height: calc(100% - 47rpx);}.timeline-event{position: relative;}.timeline-event-copy {padding: 32rpx 24rpx;position: relative;top: -47rpx;left: 42rpx;width: 536rpx;background-color: #FFFFFF;margin-bottom: 20rpx;border-radius: 20rpx;}.timeline-event-icon{background-color: #ffffff00;outline: 0rpx solid #FF0000;display: block;margin: 0rpx 0rpx 0rpx 0rpx;position: absolute;top: 0rpx;left: 0rpx;width: 28rpx;height: 28rpx;}.timeline-event-thumbnail{color: #38254D;font-weight: bold;font-size: 30rpx;display: inline-flex;width: 100%;margin-bottom: 0rpx;align-items: center;justify-content: space-between;}.timeline-event-content{display: flex;flex-direction: column;margin-top: 20rpx;margin-bottom: 20rpx;text{font-size: 26rpx;color: #574966;line-height: 40rpx;}.btn{align-self: flex-end;font-size: 26rpx;color: #F06245;line-height: 60rpx;text-align: center;margin-top: -40rpx;width: 140rpx;height: 60rpx;border: 1rpx solid #F06245;border-radius: 30rpx;}}
}
</style>

2、布局文件

<view class="timeline"><block v-for="(item,index) in 4" :key="index"><view class="timeline-event"><image class="timeline-event-icon" src="/static/record/table.png"></image><view class="timeline-event-copy"><view class="timeline-event-thumbnail">4月22日(周二) 18:00-19:00</view><view class="timeline-event-content"><text>教练:David Beckham</text><text>地点:西沙群岛 · 永兴岛</text><text>教室:A教室</text><view v-if="index==0" class="btn">取消请假</view></view></view></view></block>
</view>

第二种方式:使用纯css实现。效果如图二

1、样式文件

<style lang="scss">
.timeline-list{margin: 32rpx;font-size: 28rpx;list-style: none;
}
.timeline-item:last-child .timeline-item_tail {display: none;
}
.timeline-item{position: relative;padding-bottom: 20rpx;
}
.timeline-item_tail{position: absolute;left: 4rpx;height: 100%;border-left: 2rpx solid rgba(109, 209, 201, 0.3);
}.timeline-item_node{position: absolute;background-color: #FFFFFF;border-radius: 50%;display: flex;justify-content: center;align-items: center;left: -12rpx;width: 22rpx;height: 22rpx;background: #fff;border:6rpx solid #6DD1C9;
}
.timeline-item_wrapper{position: relative;padding: 32rpx 24rpx;left: 42rpx;top: -32rpx;background-color: #ffffff;border-radius: 20rpx;width: 600rpx;
}
.timeline-item_timestamp{color: #38254D;font-weight: bold;font-size: 30rpx;    line-height: 32rpx;
}
.timeline-item_content{display: flex;flex-direction: column;margin-top: 20rpx;margin-bottom: 20rpx;text{font-size: 26rpx;color: #574966;line-height: 40rpx;}.btn{align-self: flex-end;font-size: 26rpx;color: #F06245;line-height: 60rpx;text-align: center;margin-top: -40rpx;width: 140rpx;height: 60rpx;border: 1rpx solid #F06245;border-radius: 30rpx;}
}
</style>

2、布局文件

<view class="timeline-list"><block  v-for="(item, index) in 3" :key="index"><view class="timeline-item"><view class="timeline-item_tail"></view><view class="timeline-item_node"></view><view class="timeline-item_wrapper"><view class="timeline-item_timestamp">4月22日(周二) 18:00-19:00</view><view class="timeline-item_content"><text>教练:David Beckham</text><text>地点:西沙群岛 · 永兴岛</text><text>教室:A教室</text><view v-if="index==0" class="btn">取消请假</view></view></view></view></block>
</view>

ps:使用方式1,无法隐藏最后一项的时间线,而第二种方式,可以随时控制每一项的时间线。个人推荐第二种方式。

http://www.yayakq.cn/news/472430/

相关文章:

  • 专业h5网站建设教程网站建设sycmjz
  • 404网站怎么打开凡科官网登录
  • 甘肃省建设厅官方网站造价总站网站备案提示
  • 此网站正在建设中千元低价网站建设
  • 网站搭建哪家好工商执照查询官网
  • 办公网站建设html做的网页怎么变成网站
  • 电商服务站点建设方案无锡网站建设网站
  • 东莞网站建设方案维护怎么查询网站是哪家公司做的
  • 永州微网站建设记的网站域名
  • wordpress 阿里ossseo排名优化的方法
  • wordpress搭建漫画站小语种网站
  • 百度网站怎样做推广凡客网站官网
  • 微网站建设包括哪些物联网的发展前景
  • 网站开发不用框架?网站优化软件排名
  • 免费快递网站源码主动创新网站内容建设
  • 长春企业网站如何建设免费代理加盟项目
  • 做网站公司的年终总结不能打开建设银行网站怎么办
  • 免费看电视的网站有哪些wordpress首页分页
  • 个人建网站首选什么域名好wordpress怎么更改首页海报轮播图
  • 太原模板建站软件百度识图在线使用一下
  • 网站架设方式wordpress 网站换域名
  • 做网站一天成都正规搜索引擎优化
  • 国际最好的摄影作品网站企业网站建设套餐价格
  • 如何做视频类网站crm平台是什么
  • 苗木公司网站模板梅州做网站多少钱
  • 酒店网站的设计摘要网站能查到从哪里做的吗
  • 做一手楼房的网站佛山网络公司推荐
  • asp.net 个人网站长春关键词排名优化
  • 浦口建设局网站网站源码 手机 微信
  • 优秀自适应网站建设哪家好河池seo快速排名