<div class="wrapper">
<h1 class="title">Заголовок</h1>
</div>
.wrapper {
position: relative;
z-index: 0;
display: flex;
justify-content: center;
}
.wrapper:after {
content: '';
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
height: 1px;
width: 100%;
background-color: red;
z-index: -1;
margin: auto;
}
.title {
background-color: #fff;
padding: 0 10px;
}
$("form").find('.success').css('display': 'block')
document.getElementById('overlay').style='visibility:hidden;opacity:0;transition:all 0.7s ease-out 0s';
element.style.display = 'block';
const elementHeight = element.innerHeight;
element.style.display = 'none';
element.setAttribute('style', `--height:${height};`):
.element {
height: var(--height);
max-height: 300px;
}