How can I make A Pipeline Using Border In CSS

You may consider using SVG. Following code is a sample code to draw path and circle.

<!DOCTYPE html>
<html>
<body>

<svg height="400" width="450">
<path id="lineAB" d="M 100 350 l 150 -300" stroke="red" stroke-width="3" fill="none" />
  <path id="lineBC" d="M 250 50 l 150 300" stroke="red" stroke-width="3" fill="none" />
  <path d="M 100 350 q 150 -300 300 0" stroke="blue" stroke-width="5" fill="none" />
  <g stroke="black" stroke-width="3" fill="black">
    <circle id="pointA" cx="100" cy="350" r="3" />
    <circle id="pointB" cx="250" cy="50" r="3" />
    <circle id="pointC" cx="400" cy="350" r="3" />
  </g>
  <g font-size="30" font-family="sans-serif" fill="black" stroke="none" text-anchor="middle">
    <text x="100" y="350" dx="-30">A</text>
    <text x="250" y="50" dy="-10">B</text>
    <text x="400" y="350" dx="30">C</text>
  </g>
  Sorry, your browser does not support inline SVG.
</svg>

</body>
</html>

`#first-row-left:before
{
 content: '';
 display: inline-block;
 position: absolute;
 border-radius: 50%;
 left: 0;
 width: 10px;
 height: 10px;
 z-index: 3;
 top: 25px;
}`

try something like this...


Here's one method. Perhaps not the cleanest, and it hasn't been adapted for mobile.

Here is a pen of the work using SCSS.

Here is a pen of the work using CSS. (Please note that I converted SCSS to CSS using this tool)

CAVEATS:

  1. this was not put into a SO snippet because (for whatever reason) it doesn't display correctly.
  2. I've tested only on Mac OS Chrome/Chrome Canary/FF/FFDE/Safari
  3. On the CodePen I used SCSS
  4. My CSS/SCSS/variables may cause some snickering as I'm no pro at it, and it feels a little hacky... but perhaps other edge-ish cases may cause the same feeling.
  5. I did not see that you had posted your own markup while I was writing this out. Apologies for that.
  6. The bullets can be edited to however you like, I figured the bullet styles weren't the real issue here.

CSS:

:root {
    --width: 5px;
    --border-radius: calc(var(--width) * 2);
    --button-width: 30px;
    --button-left-pos: -12.5px;
}

.row {
    margin: 0 20px;
}

img {
    border-radius: 10px;
}

.one, .two, .three, .four {
    position: relative;
}
.one::before, .one::after, .two::before, .two::after, .three::before, .three::after, .four::before, .four::after {
    position: absolute;
    top: var(--button-width);
    left: var(--button-left-pos);
    content: "";
    height: 30px;
    width: 30px;
    background: black;
    border-radius: 100px;
}
.one::after, .two::after, .three::after, .four::after {
    width: calc( var(--button-width) / 2 );
    height: calc( var(--button-width) / 2 );
    background: red;
    top: calc(var(--button-width) + var(--button-width) / 4 );
    left: -5px;
}

.two::before, .two::after {
    right: var(--button-left-pos);
    left: initial;
}
.two::after {
    right: -5px;
}

.one::after {
    width: calc( var(--button-width) / 2 );
    height: calc( var(--button-width) / 2 );
    background: red;
    top: calc(var(--button-width) + var(--button-width) / 4 );
}

.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
    grid-template-areas: "left right";
    position: relative;
}
.row:last-child {
    grid-template-areas: "border ..." "full full";
}
.row .left, .row .right {
    padding: var(--button-width);
}

.one .left {
    padding-top: 0;
    border-left: var(--width) solid;
    border-bottom: var(--width) solid;
    border-bottom-left-radius: var(--width);
}

.two {
    top: calc(var(--width) * -1);
}
.two .right {
    border-right: var(--width) solid;
    border-top: var(--width) solid;
    border-top-right-radius: var(--width);
    border-bottom-right-radius: var(--width);
    border-bottom: var(--width) solid;
}

.three {
    top: calc(var(--width) * -2);
}
.three .left {
    border-left: var(--width) solid;
    border-top: var(--width) solid;
    border-top-left-radius: var(--width);
    border-bottom-left-radius: var(--width);
}

.four {
    top: calc(var(--width) * -3);
}
.four::before, .four::after {
    top: 85px;
}
.four::before {
    left: calc(50% - 17.5px);
}
.four::after {
    top: 92.5px;
    left: calc(50% - 10.5px);
}
.four .border {
    height: 200px;
    display: block;
    border-right: var(--width) solid;
    border-top-right-radius: var(--width);
    position: relative;
}
.four .border::before {
    content: "";
    position: absolute;
    height: var(--width);
    background: black;
    top: 0;
    width: calc(100% + var(--width));
    transform: rotate(180deg);
    border-bottom-left-radius: var(--width);
    border-top-right-radius: var(--width);
}

.border {
    grid-area: border;
}

.full-width {
    grid-area: full;
    justify-self: center;
}

.left {
    grid-area: left;
}

.right {
    grid-area: right;
}

HTML:

<div class="row one">
    <div class="left">
      <img src="https://via.placeholder.com/450x250" alt="">

    </div>
    <div class="right">
      <h1>Heading</h1>
      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
        dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
    </div>
  </div>
  <!-- one -->
  <div class="row two">
    <div class="left">
      <h1>Heading</h1>
      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
        dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>

    </div>
    <div class="right">
      <img src="https://via.placeholder.com/450x250" alt="">
    </div>
  </div>
  <!-- two -->
  <div class="row three">
    <div class="left">

      <img src="https://via.placeholder.com/450x250" alt="">

    </div>
    <div class="right">
      <h1>Heading</h1>
      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
        dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
    </div>
  </div>
  <!-- three -->
  <div class="row four">
    <div class="border border-top"></div>
    <div class="full-width">
      <img src="https://via.placeholder.com/900x500" alt=""></div>
  </div>
  <!-- four -->

Tags:

Html

Css