search

Home  >  Q&A  >  body text

html - 这种错位的时间轴怎么布局,然后用css实现?

如图

主要是左边的图标是错位的,本来想用ul、li实现的。
现在第一个和最后一个有问题,第一个倒很好解决,但是最后一个怎么实现图标下面没有线?
或者有没有更好的布局方式

伊谢尔伦伊谢尔伦2779 days ago445

reply all(5)I'll reply

  • 大家讲道理

    大家讲道理2017-04-17 11:48:50

    The last one has no line and can be removed using jq’s last-child selector

    reply
    0
  • PHPz

    PHPz2017-04-17 11:48:50

    You can write it directly using inline styles

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 11:48:50

    That line is simulated using border, and the border of the last element is 0

    reply
    0
  • 高洛峰

    高洛峰2017-04-17 11:48:50

    Remove style last-child selector

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 11:48:50

    is divided into two columns. The vertical line on the left is implemented with absolute positioning. The li tag is used on the right. The line segment can be border. If you use something like border-top:1px solid #aaa;, use li:first -child{border-top:none;}, if using border-bottom, use:last-child

    reply
    0
  • Cancelreply