Leave a Comment
Обрамление произвольного текста полосками слева и справа
Хочется сделать как-нибудь так:

Но для произвольного текста.
Вот как это сделать:
.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
Для отправки комментария вам необходимо авторизоваться.