.preim { background-color: #292929; position: relative; } .preim__caption { color: white; font-family: 'Proxima_Nova_Semibold', sans-serif; font-size: 30px; width: 488px; margin-left: 170px; padding-bottom: 50px; } .preim__items { display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 70px; } .preim__item { width: 20%; text-align: left; padding: 0 30px; } .preim__title { color: white; font-family: "Proxima_Nova"; font-size: 18px; padding: 15px 0 20px; } .preim__disc { color: #e8e7e7; font-family: "Proxima_Nova"; font-size: 13px; font-weight: 300; line-height: 15px; width: 170px; } .preim__icon { width: 68px; height: 68px; border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 50%; position: relative; z-index: 3; } .preim__icon img { border-radius: 50%; background-color: #27a4ff; position: absolute; top: 0; right: 0; left: 0; bottom: 0; margin: auto; } .preim__icon-block { background: red; width: 100px; position: relative; z-index: 2; } .preim__lines { position: absolute; top: 144px; width: 90%; z-index: 1; } .preim__line { width: 85%; height: 0px; border-bottom: 3px dashed #27a4ff; position: relative; margin-top: 35px; margin-bottom: 20px; margin: 0; } .preim__line:after { content: ""; border-left: 10px solid #27a4ff; border-right: 0px solid transparent; border-top: 8px solid transparent; border-bottom: 5px solid transparent; position: absolute; left: 100%; top: -5px; } @mixin line { width: 85%; height: 0px; border-bottom: 3px dashed #27a4ff; position: relative; margin-top: 35px; margin-bottom: 20px } @mixin lineAfter { content: ""; border-left: 10px solid #27a4ff; border-right: 0px solid transparent; border-top: 8px solid transparent; border-bottom: 5px solid transparent; position: absolute; left: 100%; top: -5px; } 
 <section class="preim"> <div class="preim__lines"> <div class="preim__line"></div> </div> <div class="container"> <div class="preim__caption">НСсколько прСимущСств ΠΈ ΠΏΡ€ΠΈΡ‡ΠΈΠ½, ΠΏΠΎΡ‡Π΅ΠΌΡƒ Π²Ρ‹Π±ΠΈΡ€Π°ΡŽΡ‚ ΠΈΠΌΠ΅Π½Π½ΠΎ нас:</div> <div class="preim__items"> <div class="preim__item"> <div class="preim__icon"><img src="../img/preim/adv_icon_1.png" width="50px" height="50px" alt="img1"/></div> <div class="preim__title">ΠŸΡ€ΠΈΠ΅ΠΌΠ»Π΅ΠΌΠ°Ρ Ρ†Π΅Π½Π°</div> <p class="preim__disc">Компания осущСствляСт ΠΌΠ΅ΠΆΠ΄ΡƒΠ½Π°Ρ€ΠΎΠ΄Π½Ρ‹Π΅ Π°Π²Ρ‚ΠΎΠΌΠΎΠ±ΠΈΠ»ΡŒΠ½Ρ‹Π΅ ΠΏΠ΅Ρ€Π΅Π²ΠΎΠ·ΠΊΠΈ ΡƒΠΆΠ΅ Π±ΠΎΠ»Π΅Π΅ 10 Π»Π΅Ρ‚. </p> </div> <div class="preim__item"> <div class="preim__icon"><img src="../img/preim/adv_icon_2.png" width="50px" height="50px" alt="img2"/></div> <div class="preim__title">Π‘ΠΊΠΎΡ€ΠΎΡΡ‚ΡŒ Ρ€Π°Π±ΠΎΡ‚Ρ‹</div> <p class="preim__disc">Компания осущСствляСт ΠΌΠ΅ΠΆΠ΄ΡƒΠ½Π°Ρ€ΠΎΠ΄Π½Ρ‹Π΅ Π°Π²Ρ‚ΠΎΠΌΠΎΠ±ΠΈΠ»ΡŒΠ½Ρ‹Π΅ ΠΏΠ΅Ρ€Π΅Π²ΠΎΠ·ΠΊΠΈ ΡƒΠΆΠ΅ Π±ΠΎΠ»Π΅Π΅ 10 Π»Π΅Ρ‚.</p> </div> <div class="preim__item"> <div class="preim__icon-block"> <div class="preim__icon"><img src="../img/preim/adv_icon_3.png" width="50px" height="50px" alt="img3"/></div> </div> <div class="preim__title">Π‘Π²ΠΎΠΈ Π³Ρ€ΡƒΠ·Ρ‡ΠΈΠΊΠΈ</div> <p class="preim__disc">Компания осущСствляСт ΠΌΠ΅ΠΆΠ΄ΡƒΠ½Π°Ρ€ΠΎΠ΄Π½Ρ‹Π΅ Π°Π²Ρ‚ΠΎΠΌΠΎΠ±ΠΈΠ»ΡŒΠ½Ρ‹Π΅ ΠΏΠ΅Ρ€Π΅Π²ΠΎΠ·ΠΊΠΈ ΡƒΠΆΠ΅ Π±ΠΎΠ»Π΅Π΅ 10 Π»Π΅Ρ‚. </p> </div> </div> </div> </section>. 

Tell me what a simple way to make blue hr as in the picture. I think about pseudo-elements, but not convenient. enter image description here

The question is how to make a red background above hr? z-index does not help

enter image description here

  • Do you mean just a broken line with an arrow at the end? - Ilia Brykin
  • so you are not comfortable or can not? - user33274
  • @MaksimLensky The question is how to make the red background above hr? z-index does not help - Dmitry Suchotsky
  • then you need to do in three layers - your first strip - the second is your red block and the third round - user33274
  • @ MaksimLensky did just that, z-index gave, but it does not work. Look, maybe that's not true? - Dmitry Suchotsky

1 answer 1

 *{ margin:0; padding:0; } .line{ width:500px; height:0; border-bottom:4px dashed blue; margin:100px auto; position: relative; } .line:after{ content:""; border-left:16px solid blue; border-right:0px solid transparent; border-top:8px solid transparent; border-bottom:8px solid transparent; position: absolute; left:100%; top:-6px; } 
 <div class="line"></div> 

  • Minus for not matching the task, nothing personal. - ishidex2
  • @Duoxx how does this not fit the task? Can't you read? ΠŸΠΎΠ΄ΡΠΊΠ°ΠΆΠΈΡ‚Π΅ ΠΊΠ°ΠΊΠΈΠΌ простым способом ΡΠ΄Π΅Π»Π°Ρ‚ΡŒ синий hr ΠΊΠ°ΠΊ Π½Π° ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ΅. - user33274
  • The question is how to make a red background above hr? z-index does not help - ishidex2
  • @Duoxx he changed the question - at the moment when I wrote the answer the question was exactly in the blue bar .. what is the habit of __minus? friendly ruSO - user33274