0

<h6 class="dropdown-header">Популярные  курорты</h6>

Мой код, но он просто под собой раздел делать

введите сюда описание изображения Пример,что нужно сделать.

3 ответа 3

2

div {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  align-items: center;
}

div>hr {
  width: 200px;
  height: 1px;
  background: black;
}
<div>
  <hr>
  <h6 class="dropdown-header">Популярные курорты</h6>
  <hr>
</div>

0

.hr {
  display: flex;
  flex-basis: 100%;
  align-items: center;
  color: rgba(0, 0, 0, 0.35);
  margin: 8px 0px;
}

.hr::before,
.hr::after {
  content: "";
  flex-grow: 1;
  background: rgba(0, 0, 0, 0.35);
  height: 1px;
  font-size: 0px;
  line-height: 0px;
  margin: 0px 8px;
}
<div class="hr">Популярные курорты</div>

0
<div class="block">
  <h6 class="dropdown-header">Популярные  курорты</h6>  
</div>


.block {
  text-align: center;
}
.dropdown-header {
  position: relative;
  margin: 0;
  padding: 0 15px;
  display: inline-block;
}
.dropdown-header:before {
  content: '';
  position: absolute;
  top: 50%;
  left: 100%;
  width: 150px;
  height: 1px;
  background: #000;
}
.dropdown-header:after {
  content: '';
  position: absolute;
  top: 50%;
  right: 100%;
  width: 150px;
  height: 1px;
  background: #000;
}

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge you have read our privacy policy.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.