首页 > 其他分享 >实现序号连接线的一种样式列表

实现序号连接线的一种样式列表

时间:2022-11-29 14:57:17浏览次数:45  
标签:35px 连接线 bottom height width child 序号 div 列表

实现一种序号的连接线,类似于element-ui组件库里面的时间线组件,在工作中,这种样式的列表经常见到,如下图:

这种列表在vue里面样式的实现,废话不多说,直接上图

这样的列表样式html和css实现如下

html:

<template>
	<div class="right-bottom">
      <div class="title">
        <!-- <img src="@/assets/images/bigScreen/title-icon.png" alt="" /> -->
        <h3>最近故障信息</h3>
      </div>
      <div class="dispose-rank">
        <div v-for="(item, index) in 10" :key="item">
          <div class="lf">
            <div class="auditicon">
              {{ index + 1 }}
            </div>
            <div></div>
          </div>
          <div class="rt">
            <div class="rt-left">
              <div>
                <!-- XX供电局 -->
                2020年9月13日10时50分
              </div>

              <div>XX供电局XX站0060线发生永久接地故障</div>
            </div>
            <div class="rt-right">2020年9月13日10时50分</div>
          </div>
        </div>
      </div>
    </div>
</template>

less:

.right-bottom {
  width: 100%;
  height: ~'calc(100% - 33.3333%)';
  .title {
    margin-bottom: 10px;
  }
  .dispose-rank {
    height: ~'calc(100% - 50px)';

    overflow-y: auto;
    padding: 0 20px;
    box-sizing: border-box;
    & > div {
      display: flex;
      height: auto;
      margin-bottom: 20px;

      .lf {
        flex-grow: 0;
        width: 35px;
        min-width: 35px;
        max-width: 35px;
        position: relative;
        // & > div:nth-child(1) {
        // }
        & > div:nth-child(2) {
          height: ~'calc(100% + 8px)';
          position: absolute;
          left: 50%;
          top: 28px;
          width: 1px;
          transform: translateX(-50%);
          background: #102973;
          z-index: 66;
        }
        .auditicon {
          position: absolute;
          left: 0;
          top: 50%;
          transform: translateY(-50%);
          width: 35px;
          height: 35px;
          display: block;
          border-radius: 4px;
          background: #102973;
          z-index: 69;
          line-height: 35px;
          text-align: center;
          font-size: 18px;
          color: #fff;
          // cursor: pointer;
        }
      }
      .rt {
        // cursor: pointer;
        flex-grow: 1;
        padding-left: 28px;
        position: relative;
        font-size: 16px;
        display: flex;
        justify-content: space-between;
        .rt-left {
          & > div:nth-child(1) {
            color: #999;
            line-height: 28px;
          }

          & > div:nth-child(2) {
            line-height: 28px;
            color: #333;
          }
        }
        .rt-right {
          display: flex;
          align-items: center;
        }
      }
    }
    & > div:last-child > .lf > div:nth-child(2) {
      display: none;
    }
    & > div:last-child {
      padding-bottom: 0;
      // margin-bottom: 0;
    }
  }
}

标签:35px,连接线,bottom,height,width,child,序号,div,列表
From: https://www.cnblogs.com/lifan-fineDay/p/16935380.html

相关文章

  • 排序实练(1):列表排序-插入法及排序基础认知
    1.1插入法排序:有一个已经有序的数据序列,要求在这个已经排好的数据序列中插入一个数,但要求插入后此数据序列仍然有序,这个时候就要用到一种新的排序方法——​​插入排序法​......
  • 排序实练(2):列表排序-冒泡法/选择排序/快速排序
    ​​排序算法有很多,包括​​​​插入排序​​​,​​堆排序​​​,​​归并排序​​​,​​选择排序​​​,​​计数排序​​​,​​基数排序​​​,​​桶排序​​​,​​快速排序......
  • HTML基础-列表标签和表格标签
    HTML基础-列表标签和表格标签二、列表标签2.列表的应用场景Ø场景:在网页中按照行展示关联性的内容,如:新闻列表、排行榜、账单等Ø特点:按照行的方式,整齐显示内容Ø......
  • Scala列表数组学习
    数组 不可变数组——定义、查询、增加、循环//定义数据vararr:Array[Int]=newArray[Int](5)vararr2=Array(2,3,42,21,3)//循环以及......
  • Scala学习(除列表集合等)
    Idea配置安装 进入idea后,选取file中的setting选项,在plugins中安装scala,之后重启idea。 右键点击项目,选取AddFrameworkSupport,并选取对应的scala版本  新建......
  • python 列表排序方法
    常见的列表排序方法参考:https://blog.csdn.net/m0_69265664/article/details/125703164iterable.sort()参考:https://blog.csdn.net/rhx_qiuzhi/article/details/1193025......
  • vue 列表页面点击编辑页面传值
    props分为三种形式props为对象props为布尔值,这种只能接收params动态路由的参数props为函数,可以接收query和params参数(推荐)importVuefrom'vue'importVueRoute......
  • BikeManage下单车列表删空后判断
    ss:如果单车列表里面的单车删完了,值就为空,需要判断@OverridepublicvoidputBike(BikeCompany[]bikeCompanies,Scannerscanner){System.out.println(......
  • HCIA 访问控制列表ACL
    一、前言ACL又称访问控制列表,其实这个东西在很多地方都有用,可能名字不太一样但原理和功能都差不太多,比如服务器、防火墙,都有类似的东西,功能其实也就是“过滤”掉不想收到......
  • 列表list
    列表一共分三种一、有序列表使用ol标签来创建使用li表示列表项二、无序列表(用来做导航菜单)使用ul标签来创建使用li表示列表项三、定义列表使用dl标签来创建使用......