1 ответ
ну можно так)
body {
background-color: #333;
}
.container {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.block {
position: relative;
width: 300px;
height: 200px;
border-right: 1px solid #fff;
border-left: 1px solid #fff;
border-bottom: 1px solid #fff;
}
.block::before,
.block::after {
content: '';
width: 120px;
height: 1px;
background-color: #fff;
position: absolute;
top: 0;
}
.block::before {
left: 0;
}
.block::after {
right: 0;
}
.element {
position: absolute;
top: -20px;
left: 50%;
transform: translateX(-50%);
width: 40px;
height: 40px;
border: 1px solid #fff;
}
<div class="container">
<div class="block">
<div class="element"></div>
</div>
</div>