Css3 로 연결된 선을 다시 만들기

나는 다음 원래의 원과 선 조합으로의 구현할 수 있는 방법에 대한 포인터 효과적으로 구현하기 위한 CSS 및 찾고 있습니다. 이 동호회 및 방향선 다음과 같습니다.

! 이상적인 이미지를 프로토타입

나는 이 원) 는 다음과 같은 구축할 수 있게

span.step {
  background: #ccc;
  border-radius: 0.8em;
  -moz-border-radius: 0.8em;
  -webkit-border-radius: 0.8em;
  color: #1f79cd;
  display: inline-block;
  font-weight: bold;
  line-height: 1.6em;
  margin-right: 5px;
  text-align: center;
  width: 1.6em; 
}

하지만 까다로운 줄이 가져다줄래요 이해하기 힘들다.

이 원의 크기에 따라 활성 단계에서 방관하겠나 변경되는지 모두인지 색상에는 연결하는 선을 따라 변경 및 재계 아니라 상태. 내가 어떻게 이 작업을 수행할?

질문에 대한 의견 (5)
해결책

이 효과를 얻을 수 있습니다 ('~') 과 인접한 선택기를 수정표시 추가 없이 사용하여 의사 요소는 다음과 같이 사용된다.

! css3 가 재계 접속됨 흐름선

<! - begin 스니핏: js 숨기십시오: 거짓값 콘솔: 진정한 바벨. &gt 거짓값 -;

li {
  width: 2em;
  height: 2em;
  text-align: center;
  line-height: 2em;
  border-radius: 1em;
  background: dodgerblue;
  margin: 0 1em;
  display: inline-block;
  color: white;
  position: relative;
}

li::before{
  content: '';
  position: absolute;
  top: .9em;
  left: -4em;
  width: 4em;
  height: .2em;
  background: dodgerblue;
  z-index: -1;
}

li:first-child::before {
  display: none;
}

.active {
  background: dodgerblue;
}

.active ~ li {
  background: lightblue;
}

.active ~ li::before {
  background: lightblue;
}
<ul>
  <li>1</li>
  <li>2</li>
  <li>3</li>
  <li class="active">4</li>
  <li>5</li>
  <li>6</li>
  <li>7</li>
</ul>  

끝 - &lt 스니핏 >;!

[데모 고데펜] (http://codepen.io/bookcasey/pen/cEntL)

해설 (4)

! [플렉상자 포함하는 일정 단계를] [1]

밖으로 apc® 뛰어난 답을 내가 찾은 @bookcasey 반대 방법은 스스로 그렇게 이해했소 응답성의.

  • I put 이 동아리 '로' 전에 dtep 선택기를 (css 엇회전식 (자동).
  • 간 노선 '이' 요소에 의해 수명*을 수 있도록 플렉상자 스트레치할 수 있다.

부모 및 다른 여러 단계를 거쳐 자동으로 뻗어 칠하려면 지금 진행하고 있는 것으로 알려졌다. 그렇게 행동한다면 모피쳐 'ul' 와 '수도 있습니다 조정하십시오 font-size' 에 따라 전부 있다.

I& # 39 m 기여할 수 있는지, 그래서 언제든지 향상될 수 있습니다:)

<! - begin 스니핏: js 숨기십시오: 진정한 콘솔: 진정한 바벨. &gt 거짓값 -;

ul {
  align-content: center;
  align-items: center;
  counter-reset: stepCount;
  display: flex;
  justify-content: space-around;
  margin: 10vh auto 20vh;  /* for codepen */
}

li {
  background: dodgerblue;
  color: white;
  content: ' ';
  display: flex;
  flex-grow: 1;
  height: .3em;
  line-height: 1em;
  margin: 0;
  position: relative;
  text-align: right;
  z-index: -1;
}

li::before {
  background: dodgerblue;
  border-radius: 50%;
  color: white;
  content: counter(stepCount);
  counter-increment: stepCount;
  height: 2em;
  left: -2em;
  line-height: 2em;
  position: absolute;
  text-align: center;
  top: -.85em;
  width: 2em;
}

li.active {
  background-color: lightblue;
}

li.active~li {
  background-color: lightblue;
}

li.active~li::before {
  background-color: lightblue;
}

li:last-child {
  flex-grow: 0;
  flex-shrink: 1;
  flex-basis: 0;
/* Shorthand: flex: 0 1 0; */
}

ul.bigger {
  font-size: 1.3em;
}

ul.highlight-active li.active::before {
  font-size: 1.6em;
  background: navy;
}

ul.roman li::before {
  content: counter(stepCount, upper-roman);
}

ul.triangle li::before {
  width: 0;
  height: 0;
  border-radius: 0;
  border-left: 1em solid white;
  border-right: 1em solid white;
  border-bottom: .8em solid dodgerblue;
  content: '';
  top: -.65em;
}

ul.triangle li:first-child::before {
  left: 0;
}

ul.triangle li.active~li::before {
  border-bottom-color: lightblue;
}
<ul>
  <li></li>
  <li></li>
  <li class="active"></li>
  <li></li>
  <li></li>
  <li></li>
</ul>

<ul class="bigger highlight-active">
  <li></li>
  <li></li>
  <li class="active"></li>
  <li></li>
</ul>

<ul class="roman">
  <li></li>
  <li></li>
  <li></li>
  <li></li>
  <li></li>
  <li></li>
  <li class="active"></li>
  <li></li>
  <li></li>
  <li></li>
  <li></li>
  <li></li>
</ul>

<ul class="triangle">
  <li></li>
  <li></li>
  <li class="active"></li>
  <li></li>
  <li></li>
</ul>

끝 - &lt 스니핏 >;!

해설 (2)

비록 이 CSS3, SVG 가 더 나은 도구를 사용할 수 있는 것 같아 정교한 인터페이스입니다.

I made 이와 함께 SVG (유형화된 CSS 로):

enter 이미지 여기에 설명을!

39 의 및 here& a 털씨 소개.

해설 (0)

그러나 것은 매우 세련된 외모 뿐 아니라 내 스스로 작동하잖아 css 를 사용한 것이 더욱 때만 페르조날리즈 수 있습니다. 출처 http://jsfiddle.net/Misiu/y1Lo3qh1/

<! - begin 스니핏: js 숨기십시오: 거짓값 콘솔: 진정한 바벨. &gt 거짓값 -;

var i = 1;
$('.progress .circle').removeClass().addClass('circle');
$('.progress .bar').removeClass().addClass('bar');
setInterval(function () {
    $('.progress .circle:nth-of-type(' + i + ')').addClass('active');
    $('.progress .circle:nth-of-type(' + (i - 1) + ')').removeClass('active').addClass('done');
    $('.progress .circle:nth-of-type(' + (i - 1) + ') .label').html('✓');
    $('.progress .bar:nth-of-type(' + (i - 1) + ')').addClass('active');
    $('.progress .bar:nth-of-type(' + (i - 2) + ')').removeClass('active').addClass('done');
    i++;
    if (i == 8) {
        $('.progress .circle').removeClass().addClass('circle');
        $('.progress .bar').removeClass().addClass('bar');
        i = 1;
    }
}, 1000);
*,
*:after,
*:before {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Open Sans";
}
/* Form Progress */

.progress {

  margin: 20px auto;
  text-align: center;
  padding-bottom: 80px;
}
.progress .circle,
.progress .bar {
  display: inline-block;
  background: #fff;
  width: 40px;
  height: 40px;
  border-radius: 40px;
  border: 1px solid #d5d5da;
  vertical-align:top;
}
.progress .bar {
  position: relative;
  width: 80px;
  height: 6px;
  margin: 0 -5px 17px -5px;
  border-left: none;
  border-right: none;
  border-radius: 0;
  top:16px;
  vertical-align:top
}
.progress .circle .label {
  display: inline-block;
  width: 32px;
  height: 32px;
  line-height: 32px;
  border-radius: 32px;
  margin-top: 3px;
  color: #b5b5ba;
  font-size: 17px;
}
.progress .circle .title {
  color: #b5b5ba;
  font-size: 13px;
  line-height: 18px;
  margin-left: -30px;
  display: block;
  width: 100px;
  margin-top: 5px;
}
/* Done / Active */

.progress .bar.done,
.progress .circle.done {
  background: #eee;
}
.progress .bar.active {
  background: linear-gradient(to right, #EEE 40%, #FFF 60%);
}
.progress .circle.done .label {
  color: #FFF;
  background: #8bc435;
  box-shadow: inset 0 0 2px rgba(0, 0, 0, .2);
}
.progress .circle.done .title {
  color: #444;
}
.progress .circle.active .label {
  color: #FFF;
  background: #0c95be;
  box-shadow: inset 0 0 2px rgba(0, 0, 0, .2);
}
.progress .circle.active .title {
  color: #0c95be;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

<div class="progress">
  <div class="circle done"> <span class="label">1</span>
    <span class="title">Order</span>

  </div> <span class="bar done"></span>

  <div class="circle done"> <span class="label">2</span>
    <span class="title">Address</span>

  </div> <span class="bar active"></span>

  <div class="circle active"> <span class="label">3</span>
    <span class="title">Payment</span>

  </div> <span class="bar"></span>

  <div class="circle"> <span class="label">4</span>
    <span class="title">Review</span>

  </div> <span class="bar"></span>

  <div class="circle"> <span class="label">5</span>
    <span class="title">Finish</span>

  </div>
</div>
<div class="progress">
  <div class="circle done"> <span class="label">1</span>
    <span class="title">Order informations</span>

  </div> <span class="bar active"></span>

  <div class="circle active"> <span class="label">2</span>
    <span class="title">Order review</span>

  </div> <span class="bar"></span>

  <div class="circle"> <span class="label">3</span>
    <span class="title">Finish</span>

  </div>
</div>

끝 - &lt 스니핏 >;!

해설 (1)

뭐, it& # 39, 많은 수정표시 확장하지만 할 수 있는 이 같은 일이 아니다.

사용 '디스플레이: 표에서 않을 뿐만 아니라, '자동 조정 폭은 항목에서와 칠하려면 독창적이다.

그 후, 일련의 서클 요소, 일련의 선 요소가 있다. 그냥 그들에 대한, 그리고 서클 선 요소가 투명지에 아래쪽 경계 요소는 상대적으로 포지셔닝됩니까 아래쪽으로 그냥 정렬하려면 선과 함께.

참고로, 언론계, 재계, 그렇지 않으면 추가 컨테이너입니다 표에서 거역하기를 '' 가 갖춰야 할 모든 것을 # 39, 동일한 높이, 진실이며당신이 don& 된 것입니다. 이렇게 하면 할 수 있으며, 이러한 컨테이너입니다 너비입니다 설정되었습니다 1px 인력용 redhat. it& # 39 는 크기, s 자.

체크아웃하려고 이 데모:

http://jsfiddle.net/Sjdm4/

해설 (1)

예 저도 따라 이같이 대답: https://codepen.io/Smakosh/pen/ZvvyMg

Pug
ul
  li.list.active 1
  li.list 2
  li.list 3
  li.list 4
Sass
ul
  list-style: none
    li
      display: inline-block
      width: 4rem
      height: 4rem
      line-height: 4rem
      border-radius: 100%
      background: #d8d8d8
      margin-right: 2rem
      position: relative
      &:first-child
        margin-left: unset
        &:before
          display: none
      &:before
        content: ''
        width: 2.4rem
        background-color: #d8d8d8
        height: 2px
        position: absolute
        top: 2rem
        right: 3.9rem
    .active
      background: #03A9F4
      color: #fff
      &:before
        background-color: #03A9F4
해설 (0)

난 내 사용할 수 있도록 부트스트랩에 4 및 폰타바섬 버전입니다.

39, here& 코드 s 펜: [링크] https://codepen.io/tr4c355/pen/roBjWV

HTML &amp. CSS.


.line-btw { 
  height:3px;
  width:100px;
  background-color: orange;
}

div class = &quot 진행율 p-5 d 플렉스 align-items-center&quot &gt <;;;

<div class="fa-stack fa-lg text-center">

  <div class="">1</div>
</div>
<div class="line-btw"></div>
<div class="fa-stack fa-lg text-center" style="">

  <div style="">2</div>
</div>
<div class="line-btw"></div>
<div class="fa-stack fa-lg text-center" style="">

  <div class="">3</div>
</div>

&lt /div>;

해설 (0)