Обрамление произвольного текста полосками слева и справа

Хочется сделать как-нибудь так:
d6c7a771bf7f069e0aa325212a9fdeb53eaa013955
Но для произвольного текста.


Вот как это сделать:

.wrap {
  overflow: hidden;
  position: relative;
  width: 100%;
  text-align: center;
}

.line {
  position: relative;
  display: inline-block;
}

.line:before {
  display: block;
  position: absolute;
  content: '';
  height: 1px;
  background-color: #000;
  width: 700px;
  left: 100%;
    top: 0;
}

.line:after {
  display: block;
  position: absolute;
  content: '';
  height: 1px;
  background-color: red;
  width: 700px;
  right: 100%;
  top: 0;
}

Вот полный пример (коллега помог, сделал):
JS Bin

LEAVE A COMMENT