A
A
Andrew2018-10-05 00:34:04
Layout
Andrew, 2018-10-05 00:34:04

How is it possible to implement a timeline with a snake?

Guys, tell me how you can implement such a timeline
. Preferably in an adaptive, but that's another question.
5bb687037f9f0457208934.png

Answer the question

In order to leave comments, you need to log in

4 answer(s)
C
Christina, 2018-10-05
@KrisIris

Native perversions in the studio! https://codepen.io/anon/pen/XxKNqg?editors=1100
With svg it will be easier, but we are not looking for easy ways, right?
UPD: gave an example with text.

.wrapper{
  position: absolute;
  top: 25px;
  bottom: 25px;
  left: 0;
  right: 0;
}

.wrap{
  position: relative;
  max-width: 1200px;
  margin: 50px auto;
  
  &__list{
    display: flex;
    justify-content: space-around;
    margin-bottom: 80px;
  }
  
  &__item{
    position: relative;
    z-index: 1;
    width: 50px;
    height: 50px;
    background: url('https://image.flaticon.com/icons/svg/138/138932.svg');
  }
  
  &__title{
    position: absolute;
    left: 0;
    bottom: -100%;
  }
  
  &__timeline{
    position: absolute;
    left: 0;
    right: 0;
    height: 50%;
    
    &--first{
      top: 0;
      right: 0;
      border-right: 2px solid lightblue;
      border-radius: 0 20px 20px 0;
      
      &::before{
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: -1px;
        bottom: 0;
        border-top: 2px solid lightblue;
        border-radius: 0 20px 0 0;
      }
      
      &::after{
        content: '';
        position: absolute;
        left: 100px;
        right: -1px;
        height: 100%;
        border-bottom: 2px solid lightblue;
        border-radius: 0 0 20px 0;
      }
    }
    
    &--second{
      bottom: 0;
      left: 0;
      border-left: 2px solid lightblue;
      border-radius: 20px 0 0 20px ;
      
      &::before{
        content: '';
        position: absolute;
        left: -1px;
        right: 100px;
        top: 0;
        height: 100%;
        border-top: 2px solid lightblue;
        border-radius: 20px 0 0 0;
      }
      
      &::after{
        content: '';
        position: absolute;
        left: -1px;
        right: 0;
        bottom: 0;
        height: 100%;
        border-bottom: 2px solid lightblue;
        border-radius: 0 0 0 20px;
      }
    }
  }
}

N
Nikita-Fast, 2018-10-05
@Nikita-Fast

Of course, you can do all this on SVG, but for example, I did this: codepen.io/pen

J
Junior Eternal, 2018-10-05
@maxinfo78

The line can be made:
- through the background, but there may be difficulties with adaptive
- using two blocks, without a background, but with rounded borders on several sides
- draw on svg

D
dicem, 2018-10-05
@dicem

You can search here: Connecting Arrows for Block Elements

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question